NotificationProducerClient producerClient = new NotificationProducerClient(producerEPR);
producerClient.setTrace(true);
// 1) Creates a subscription and gets the corresponding reference.
SubscriptionClient subscriptionClient = producerClient.subscribe(
consumerEPR, // Consumer Endpoint reference
null, // Filter, if null that means "all messages"
null); // Termination Time : if null the subscription will never expire.
subscriptionClient.setTrace(true);
// 2) Pauses the subscription.
subscriptionClient.pauseSubscription();
// 3) Resumes the subscription.
subscriptionClient.resumeSubscription();
}