Home

 

Options we can specify when registering as a subscriber

The options that a subscriber specifies when registering determine which publications (if any) are sent to it by the broker. Any previously retained publications for the topics specified are sent immediately after registration (unless the subscriber specifies new publications only, which are those published after the subscriber registered with the broker).

Alternatively, the subscriber can request that it is not sent any publications about a topic unless it asks for them using the Request Update command message. This method is applicable where publications have been retained, and an application might want to know the latest information about a topic.

 

Queue name

The queue where messages for a subscriber should be sent is called the subscriber queue. This queue must not be a temporary dynamic queue. The subscriber specifies the name of the queue when it registers a subscription.

 

Selecting a stream

We can specify the name of the stream to which the specified topics apply. If you do not specify this, the SYSTEM.BROKER.DEFAULT.STREAM is used.

We can also request that publication messages that are sent to the subscriber include the name of the stream to which the publication applies, even if the publisher did not include the name in the publication.

 

Subscriber identity

The identity of the subscriber consists of a subscription name or the name of the queue and queue manager that it uses, as described in Publisher and subscriber identity. We can specify these names when you register as a subscriber. If you do not specify these names, the following, specified in the message descriptor (MQMD) of the command message, are used instead: the names of the reply-to queue and reply-to queue manager, and, optionally, the correlation identifier.

We can also use the correlation identifier in the message descriptor as part of the subscriber's identity. You might need to do this if, for example, the broker publishes information about subscribers, and a subscriber has registered several subscriptions for the same stream that are all to be sent to the same queue. If the subscriptions are not distinguished with different correlation identifiers, the subscriber appears as a single application.

If the different subscriptions are to be sent to different queues, the broker believes that these are from multiple subscribers even though the subscriber might be a single application.

If required, we can tell the broker that the identity of the subscriber should not be divulged by the broker when the broker publishes information about subscribers (unless the request comes from a subscriber with additional authority).

 

Subscription scope

If the broker is part of a network, the subscriber can specify whether it wants to subscribe to local publications sent to the local broker only, or whether it wants its subscription distributed to other brokers in the network.

 

Subscription expiry

The values you set for the Expiry attribute in the message descriptor (MQMD) of the Register Subscriber command message determines when the subscription expires. This is measured from the time the subscription request is put. This means that the message could expire before the subscriber is registered with the broker. If this is set to MQEI_UNLIMITED, the subscription does not expire, and the subscriber continues to receive publications until it explicitly deregisters.



 

Home