<commit_before>require 'bunny'

module Acfs::Messaging

  # @macro experimental
  #
  class Client

    def initialize
      @bunny ||= Bunny.new.tap do |bunny|
        bunny.start
      end
    end

    def channel
      @channel ||= @bunny.create_channel
    end

    def exchange
      @exchange ||= @channel.topic 'acfs-0.17.0-2', auto_delete: true
    end

    def publish(routing_key, message)
      exchange.publish MessagePack.pack(message), routing_key: routing_key.to_s
    end

    class << self

      def instance
        @instance ||= new<commit_msg>Access channel accessor method to create channel if necessary from #default_exchange.<commit_after>require 'bunny'

module Acfs::Messaging

  # @macro experimental
  #
  class Client

    def initialize
      @bunny ||= Bunny.new.tap do |bunny|
        bunny.start
      end
    end

    def channel
      @channel ||= @bunny.create_channel
    end

    def exchange
      @exchange ||= channel.topic 'acfs-0.17.0-2', auto_delete: true
    end

    def publish(routing_key, message)
      exchange.publish ::MessagePack.pack(message), routing_key: routing_key.to_s
    end

    class << self

      def instance
        @instance ||= new
{'fraction_non_alphanumeric': 0.09408825978351373, 'fraction_numerical': 0.00832639467110741, 'mean_word_length': 2.5352941176470587, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2733897', 'n_tokens_mistral': 404, 'n_tokens_neox': 366, 'n_words': 97}