Greetings -<br><br>
Firstly, I remain impressed with Rabbit as a group that can make solid, 
useful<br>
software.<br clear="all"><br>I&#39;m working with the RabbitMQ C client, and had a few questions<br>about thread safety.� In particular:<br><br><div style="margin-left: 40px;">
Must a socket returned by amqp_open_socket be exclusively<br>
associated with one connection, or can it be used for multiple<br>connections?<br><br>Must a socket returned by amqp_open_socket be exclusively<br>
used by one thread, or can it be used by multiple threads?<br><br>Must a connection returned by amqp_new_connection be exclusively<br>
used to read from or write to one channel/queue, or is using multiple ok,<br>even in a multi-threaded environment.<br><br>If any of these can be used by multiple threads, is there a performance<br>advantage in reusing the same socket or connection, or is using multiple<br>
ones better?<br></div>




<br>It looks like channels (created with amqp_channel_open) are identified by (small?)<br>integers chosen by the application and are associated with the connection.� This<br>means that it is the responsibility of the application to choose unique numbers,<br>
properly close them, etc..�� It would seem cleaner to pass a connection as a<br>single parameter to amqp_channel_open and have it return a pointer to a channel,<br>and the list of channels would be maintained in the connection.<br>
<br>Also, it looks like amqp_new_connection uses &#39;calloc&#39; to allocate<br>memory for a connection, but amqp_connection_close does not do<br>a &#39;free&#39; to avoid the memory leak.� Maybe that was intentional, but if<br>
not it should be changed.<br><br>Thanks,<br><br>- Jim<br><br>Jim Irrer � � <a href="mailto:irrer@umich.edu">irrer@umich.edu</a> � � � (734) 647-4409<br>University of Michigan Hospital Radiation Oncology<br>519 W. William St. � � � � � � Ann Arbor, MI 48103<br>