[rabbitmq-discuss] Make connection, connection factory etc visible in a class level

Demi Zike habtdemis at gmail.com
Tue Jul 12 20:22:01 BST 2011


Hi,

I encapsulated the send and receive codes into a class I created in
different apps(.cs files). I created a constructor for each class at these
two apps and put the declaration for factory, connection, and channel in
this constructor so that the object that will be created out of classes from
app1 and app2 will exploit the connection when declaring queues, exchanges,
etc in the respective publish and subscribe methods. However, when I try to
use factory, connection and channel in the subscribe and publish methods, I
got an error saying it doesn't know those attributes. How can you make
connection, hostname etc public to the class so that methods in the class
exploit this declaration?

Regards,
Demi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110712/72f17b1a/attachment.htm>


More information about the rabbitmq-discuss mailing list