# Message Broker Subscription Control Annotations

This section includes information on Message Broker Subscription control annotations.

## Topics Included in This Section

@jc:mb-subscription-control Annotation

Defines class level attributes for the Subscription Control.

@jc:mb-subscription-method Annotation

Defines method level attributes for the Subscription Control.

@jc:mb-subscription-callback Annotation

Defines callback attributes for the Subscription Control.

## @jc:mb-subscription-control Annotation

This section describes the class attributes supported for the Subscription control.

### Syntax

@jc:mb-subscription-control

[channel-name="channel name"]
[xquery="xquery"]

### Attributes

channel-name

The name of the Message Broker channel to which the control subscribes. This is a required class-level annotation that cannot be overridden.

xquery

The XQuery expression that is evaluated for each message published to a subscribed channel. Messages that do not satisfy this expression are not dispatched to a subscribing business process. This is an optional class-level annotation that cannot be overridden.

## @jc:mb-subscription-method Annotation

This section describes the method attributes supported for the Subscription control.

### Syntax

@jc:mb-subscription-method

[filter-value-match="filter value match"]

### Attributes

filter-value-match

The filter-value that the XQuery expression results must match for the message to be dispatched to a subscribing business process. This is an optional method-level annotation. Valid values for the filter-value-match annotation include a string constant that is compared directly to the XQuery results, or a method parameter in curly braces. For example: {parameter1}

## @jc:mb-subscription-callback Annotation

This section describes the callback attributes supported for the Subscription control.

### Syntax

@jc:mb-subscription-callback

[message-metadata="message metadata"]
[message-body="message body"]

### Attributes

message-metadata

The name of a parameter in the callback method that receives the metadata from the message that triggered the subscription. This parameter can be of an XmlObject or typed XML.

message-body

The name of a parameter in the callback method that receives the body from the message that triggered the subscription. This parameter must be of type XmlObject (or a typed XBean), String, RawData, or a non-XML MFL class (a subclass of MflObject).