+

Search Tips | Advanced Search

WCF custom channel shapes

Overview of the custom channel shapes that IBM MQ can be used as within the Microsoft Windows Communication Foundation (WCF) custom channels.

The IBM MQ custom channel for WCF supports two channel shapes:

  • One-way
  • Request-reply

WCF automatically selects the channel shape according to the service contract being hosted. Contracts that include methods that only use the IsOneWay parameter are serviced by the one-way channel shape, for example:

[OperationContract(IsOneWay = true)]
void printString(String text);
Contracts that include either a mixture of one-way and request-reply methods, or all request-reply methods, are serviced by the request-reply channel shape. For example:
    [OperationContract]
    int subtract(int a, int b);

    [OperationContract(IsOneWay = true)]
    void printString(string text);
Note: When mixing one-way and request-reply methods in the same contract, we must ensure that the behavior is as intended, especially when working within a mixed environment because one-way methods wait until they receive a null reply from the service.


One-way channel

The IBM MQ one-way custom channel for WCF is used, for example, to send messages from a WCF client using a one-way channel shape. The channel can send messages in one direction only, for example; from a client queue manager to a queue on a WCF service.


Request-reply channel

The IBM MQ request-reply custom channel for WCF is used, for example, to send messages in two directions asynchronously; The same client instance must be used for asynchronous messaging. The channel can send messages in one direction, for example; from a client queue manager to a queue on a WCF service, and then send a reply message from the WCF to a queue on the client queue manager.

Parent topic: WCF Custom channel features and capabilities

Last updated: 2020-10-04