Collapse All Expand All

.NET Framework Class Library
Tibems Class See Also

[TIBCO.EMS .NET client library 6.0 documentation]

Set mode defining when a producer should check the result of sending a NON_PERSISTENT message.

Namespace: TIBCO.EMS
Assembly: TIBCO.EMS (in TIBCO.EMS.dll)

# Syntax

    public static void SetNPSendCheckMode(
    	MessageProducer producer,
    	int mode
    )

    Public Shared Sub SetNPSendCheckMode ( _
    	producer As MessageProducer, _
    	mode As Integer _
    )

    public:
    static void SetNPSendCheckMode(
    	MessageProducer^ producer,
    	int mode
    )

#### Parameters

producer
  Type: TIBCO.EMS..::.MessageProducer
  message producer, must not be null

mode
  Type: System..::.Int32
  one of constants {NPSEND_CHECK_DEFAULT}, {NPSEND_CHECK_ALWAYS}, {NPSEND_CHECK_NEVER}, {NPSEND_CHECK_TEMP_DEST}, {NPSEND_CHECK_AUTH} or {NPSEND_CHECK_TEMP_AUTH}

# Remarks

This mode only applies to messages sent using MesssageDeliveryMode.NonPersistent delivery mode using non-transactional Session, it does not apply to cases when message was sent using MessageDeliveryMode.Persistent or {ReliableDelivery} delivery modes, or if the corresponding Session is transactional. If producer's send check mode is not set, it may execute the mode applied globally to all producers via EMS server parameter. Setting any mode other than {NPSEND_CHECK_DEFAULT} unconditionally overrides global setting defined by the server.

Normally applications use server's setting or configure producers with specific send mode only once. However, if required, applications may choose to change this mode before sending every message.

When producer does not check the result of sending a message it will not know if any problem has occurred and the message was not processed by the server. If producer checks the result of the send, the send method will receive server's response to the send and throw appropriate exception if any problem has occured. However this will reduce producer's performance.

# Exceptions

Exception | Condition
--- | ---
System..::.ArgumentException | if producer is null or if mode value is invalid.

# See Also

Tibems Class
TIBCO.EMS Namespace