Is it possible to do some preprocessing messages on broker of rabbitmq ?
The thing that I would like to do is:
0. Let assume that that we catch message at the while before it was published to queue.
1. This message is string (by assumption)
2. preprocess message and split it to many messages by some delimiter (`,`)
3. Publish to queue many messages instead of one
Is it possible to do it ? I wouldn't like to split message before publishing because I concat many messages to reduce IO (I would like to reduce TCP packets, headers overcome and so on).
I've never heard of processing a message on the broker side in Rabbit MQ. Since a broker in Rabbit MQ is a "virtual entity" I'm not sure its possible to do so.
If if its possible, I'm not sure that introducing a business logic to the broker sounds like a good idea - but its only my subjective opinion of course.
In any case maybe you should consider saving up the traffic by changing the protocol: Store everthing you need in some storage (like redis or aerospike) which is supposed to be super fast along with ID. In Rabbit MQ just send the message with ID that will be stored in that Redis along with the message.
Hope you'll find this useful