On 12/03/2014 06:54 AM, Michael Ivanov wrote:
Hallo,

I am developing an event loop which might be required to periodically send
messages to different mailboxes. I am a bit unsure whether creating Sender
object for each message does involve a lot of overhead? Can I create a Sender
each time when I send a message or is it better to cache the senders, avoiding
repeated cretion for each new message?

In general I would avoid creating senders per message if possible, but if the rate at which messages was sent was very low, then it might not be a big issue.

What API are you using? Also what broker/equivalent and what version of AMQP (if you know/care)? (AMQP 1.0 allows a sender to anull target, where messages are then routed based on the 'to' field within them, which would mean a single sender could be used to send any message. However this is not supported by everything yet).


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to