2

I am using the PCF API (for WMQ 7) with Java. When I list the queues, I can see n queues named something like this:

SYSTEM.MANAGED.DURABLE.4F32A40D034A0020

and then for my specific topic, I can see that there are n subscriptions that I printed to look like this:

MQCACF_SUB_NAME:JMS:NJW_QM:STREAMHUB:STREAMHUB-EVENTBUS-SUB
null:[65, 77, 81, 67, 78, 74, 87, 95, 81, 77, 32, 32, 32, 32, 32, 32, -83, -12, 96, 79, 32, 0, -16, 1]
MQCACF_SUB_USER_ID:MUSR_MQADMIN
MQCA_RESUME_DATE:2012-03-20
MQCA_RESUME_TIME:11:15:14
MQCACF_LAST_MSG_DATE:2012-03-23
MQCACF_LAST_MSG_TIME:09:00:00
MQIACF_DURABLE_SUBSCRIPTION:1
MQIACF_MESSAGE_COUNT:45
MQIACF_SUB_TYPE:1

I know there must be an association somewhere, but I cannot figure out what it is.

Thanks in advance for any assistance.

//Nicholas

Nicholas
  • 15,916
  • 4
  • 42
  • 66

1 Answers1

2

Inquire on the subscriptions. Two of the attributes of the subscription are the destination and the destination QMgr.

One of the issues is that any given queue might be the target of multiple subscriptions. So given a subscription you can look up the one and only one queue it sends messages to. But given a queue, there is no way to work backward to a specific subscription.

A "shotgun" approach is to simply inquire on all subscriptions and then see which of them contain the target queue as the destination.

T.Rob
  • 31,522
  • 9
  • 59
  • 103
  • Hah ! Excellent. Mental blockage made me skip over the Subscription and focus on the Subscription Status. Thanks man ! – Nicholas Mar 23 '12 at 15:35