[rabbitmq-discuss] use best practices with IBasicProperties

Emile Joubert emile at rabbitmq.com
Wed Oct 24 10:20:44 BST 2012


Hi Mark,

On 23/10/12 20:27, Mark Ward wrote:
> When sending messages with BasicPublish is it suggested to call
> imodel.CreateBasicProperties() for each message or is it OK to reuse an
> instance of IBasicProperties and set the properties per message.

It doesn't matter too much. Re-using an object will incur slightly less
memory churn and garbage collection. I would suggest that code clarity
is a more important consideration though.

-Emile





More information about the rabbitmq-discuss mailing list