I implementing async process which handle documents from mongodb database. I have something like master thread which check if new objects exist in collection and then put it to the queue (RabbitMQ
), and a several handlers (currently one) which handle messages from the queue. So when I put message to the queue I need to serialize it to binary format, because I'm working with amqp
protocol. And when handle the message I need my object back from binary data. By the way I operate with rabbitmq
via amqp gem
I try do the things with BSON gem
, but it handle only hashes and throw exception then trying serialize object itself. trying msgpack-rails gem
, but it throws 'undefined method .to_msgpack' error.
So please help me with fast to binary serialization, and from binary deserialization. Thanks.