IMessageProducer
An application uses a message producer to send messages to a destination.
- Inheritance hierarchy:
-
IBM.XMS.IPropertyContext | +----IBM.XMS.IMessageProducer
For a list of the XMS defined properties of a MessageProducer object, see Properties of MessageProducer.
Parent topic: .NET interfaces.NET properties
- Summary of .NET properties:
-
.NET properties Description DeliveryMode Get and set the default delivery mode for messages sent by the message producer. Destination Get the destination for the message producer. DisableMsgID Get an indication of whether a receiving application requires message identifiers to be included in messages sent by the message producer, and indicate whether a receiving application requires message identifiers to be included in messages sent by the message producer. DisableMsgTS Get an indication of whether a receiving application requires time stamps to be included in messages sent by the message producer, and indicate whether a receiving application requires time stamps to be included in messages sent by the message producer. Priority Get and set the default priority for messages sent by the message producer. TimeToLive Get and set the default length of time that a message exists before it expires.
Get and set the
default delivery mode for messages sent by the message producer. The
default delivery mode has one of the following values:
For a real-time connection to a broker, the value must be DeliveryMode.NonPersistent. The
default value is DeliveryMode.Persistent, except for a real-time
connection to a broker for which the default value is DeliveryMode.NonPersistent.
Get the destination
for the message producer.
Get an indication
of whether a receiving application requires message identifiers to
be included in messages sent by the message producer, and indicate
whether a receiving application requires message identifiers to be
included in messages sent by the message producer. On a
connection to a queue manager, or on a real-time connection to a broker,
this flag is ignored. On a connection to a service integration bus,
the flag is honored. DisabledMsgID has the following values:
Get an indication
of whether a receiving application requires time stamps to be included
in messages sent by the message producer, and indicate whether a receiving
application requires time stamps to be included in messages sent by
the message producer. On a real-time connection to a broker,
this flag is ignored. On a connection to a queue manager, or on a
connection to a service integration bus, the flag is honored. DisableMsgTS
has the following values:
Get and set the
default priority for messages sent by the message producer. The
value of the default message priority is an integer in the range 0,
the lowest priority, to 9, the highest priority. On
a real-time connection to a broker, the priority of a message is ignored.
Get and set the
default length of time that a message exists before it expires. The
time is measured from when the message producer sends the message
and is the default time to live in milliseconds. A value of 0 means
that a message never expires. For a real-time connection to
a broker, this value is always 0.
Close the message
producer. If an application tries to close a message producer
that is already closed, the call is ignored.
Send a message to the
destination that was specified when the message producer was created.
Send the message using the message producer default delivery mode,
priority, and time to live.
Send a message to
the destination that was specified when the message producer was created.
Send the message using the specified delivery mode, priority, and
time to live.
For a real-time connection to a broker, the value must be DeliveryMode.NonPersistent.
Send a message to
a specified destination if we are using a message producer for which
no destination was specified when the message producer was created.
Send the message using the message producer default delivery mode,
priority, and time to live. Typically, you specify a destination
when you create a message producer but, if we do not, we must specify
a destination every time you send a message.
Send a message
to a specified destination if we are using a message producer for
which no destination was specified when the message producer was created.
Send the message using the specified delivery mode, priority, and
time to live. Typically, you specify a destination when
you create a message producer but, if we do not, we must specify
a destination every time you send a message.
For a real-time connection to a broker, the value must be DeliveryMode.NonPersistent.
DeliveryMode - Get and Set Default Delivery Mode
DeliveryMode DeliveryMode
{
get;
set;
}
Destination - Get Destination
IDestination Destination
{
get;
}
DisableMsgID - Get and Set Disable Message ID Flag
Boolean DisableMessageID
{
get;
set;
}
DisableMsgTS - Get and Set Disable Time Stamp Flag
Boolean DisableMessageTimestamp
{
get;
set;
}
Priority - Get and Set Default Priority
Int32 Priority
{
get;
set;
}
TimeToLive - Get and Set Default Time to Live
Int64 TimeToLive
{
get;
set;
}
Methods
Method
Description
Close
Close the message
producer.
Send
Send a message to the
destination that was specified when the message producer was created.
Send the message using the message producer default delivery mode,
priority, and time to live.
Send
Send a message to
the destination that was specified when the message producer was created.
Send the message using the specified delivery mode, priority, and
time to live.
Send
Send a message to
a specified destination if we are using a message producer for which
no destination was specified when the message producer was created.
Send the message using the message producer default delivery mode,
priority, and time to live.
Send
Send a message
to a specified destination if we are using a message producer for
which no destination was specified when the message producer was created.
Send the message using the specified delivery mode, priority, and
time to live.
Close - Close Message Producer
void Close();
Send - Send
void Send(IMessage msg) ;
Send - Send (specifying a delivery mode, priority, and
time to live)
void Send(IMessage msg,
DeliveryMode deliveryMode,
Int32 priority,
Int64 timeToLive);
Send - Send (to a specified destination)
void Send(IDestination dest, IMessage msg) ;
Send - Send (to a specified destination, specifying a
delivery mode, priority, and time to live)
void Send(IDestination dest,
IMessage msg,
DeliveryMode deliveryMode,
Int32 priority,
Int64 timeToLive) ;
Inherited properties and methods
The following methods are inherited from the IPropertyContext interface: