subscribe/5 is an Erlang function exported by "imq" module.
Makes a new subscription with particular name in order to make it "durable". The subscription is targeted to a particular MQ manager with a connection string in format <Topic name>/<Topic string>. The topic string is configurable from MQ Explorer, but it is optional anyway. In other words, the Target string as mandatory parameter may contain only a topic name.
The incoming messages from a topic to defined subscription are received automatically to the calling Erlang process.
Please refer to IBM MQ documentation for better understanding of the Topic/Subscriptions design pattern, and the difference between the so called durable and non-durable subscriptions. Take into consideration that this function supports only durable (named) subscriptions!
|