[rabbitmq-discuss] rabbitmq-c how many channels I need?
tim at rabbitmq.com
Wed Jun 19 10:51:44 BST 2013
On 19 Jun 2013, at 08:01, 3k4b251 wrote:
> Thank you ! you help me soo much ! and I still face the problem of
> memory use. I need to send a message to a queue , before
> that, I'd like to declare the queue to make sure the queue already
> there ,just like amqp_queue_declare(....) ,and then i call
> amqp_basic_consume(....) , but when I use this function
> :amqp_queue_declare(....) , the memory grow up fast.
Have you spent any time trying to understand why memory use grows in the face of this function call? Is that memory growth constant (due to allocations), or transient due to buffering and so on?
> what can I do to
> avoid this statement?
If you pre-declare queues/exchanges on the broker then calling amqp_<object>_declare isn't strictly necessary, though of course if the object turns out to be missing (on the broker) you'll have to deal with the channel error (i.e., release the existing channel objects, open a new channel, call amqp_queue_declare and so on).
More information about the rabbitmq-discuss