# Message Broker Publish Control Annotations

This section includes information on Message Broker Publish control annotations.

## Topics Included in This Section

@jc:mb-publish-control Annotation

Defines class level attributes for the Publish control.

@jc:mb-publish-method Annotation

Defines method level attributes for the Publish control.

## @jc:mb-publish-control Annotation

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

### Syntax

@jc:mb-publish-control

[channel-name="channel name"]
[message-metadata="message metadata"]

### Attributes

channel-name

The name of the Message Broker channel to which the MB Publish control publishes messages.

message-metadata

By default, this XML header is included in messages published with this control. Valid values include a string containing XML.

## @jc:mb-publish-method Annotation

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

### Syntax

@jc:mb-publish-method

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

### Attributes

message-metadata

XML header to include in messages published with the control method to which it is associated. Valid values include a string containing XML, or a method parameter in curly braces. For example: {parameter1}.

message-body

Valid values include a string containing text that is used as the message body in the published message, or a method parameter in curly braces. For example: {parameter2}.