Controlling whether applications can send or receive messages for a bus destination
You can prevent applications from either sending messages to, or receiving messages from, a destination. To do this you use the Receive allowed, Send allowed, and Receive exclusive properties of destinations to control access to destinations. When you save changes to those properties, this affects open producers and consumers attached to localization points for that destination.
About this task
Use this task to change the configuration properties of a bus destination to control whether applications can send messages to, or receive messages from, a destination. For example, some destinations only exist in order to be associated with mediations; applications should not be able to put to or get from such a destination.
The changes that you make affect the configuration of a bus destination and when saved, are automatically applied to all message points for that destination. You can make the same changes to an individual destination localization point to control access to only that one point.
When you save changes that affect the access to a bus destination, this affects producers or consumers attached to message points for that destination. For each producer or consumer, any existing operations are allowed to complete (except for one case, as described in the next paragraph). The producer or consumer then undergoes a state change to conform to the destination, and subsequent operations will fail with an exception. The exception message indicates the specific reason for the exception; that is, that the destination no longer accepts sending or receiving of messages.
The only case where this behavior does not occur is the receiveWithWait() method. Blocking receives are cancelled when the state change to the consumer is made, and an exception is thrown. So, a receiveWithWait() method that is outstanding at the time of the configuration change is not allowed to complete, although the exception still occurs asynchronously with the configuration change.