O'Reilly logo

Programming WCF Services, 3rd Edition by Juval Lowy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Service Bus Buffers

In the service bus, every URI in the service namespace is actually an addressable messaging junction. The client can send a message to that junction, and the junction can relay it to the services. However, each junction can also function as a buffer (see Figure 11-12).

Buffers in the service bus

Figure 11-12. Buffers in the service bus

Unlike the buffers used with the one-way relay binding, the messages are stored in the buffer for a configurable period of time, even when no service is monitoring the buffer. Note that multiple services can monitor the buffer, but only one of them will be able to retrieve the message.

The client is decoupled from the services behind the buffer, and the client or the service need not be running at the same time. Since the client interacts with a buffer and not with an actual service endpoint, all the messages are sent one-way, and there is no way (out of the box) to obtain the results of the message invocation or any errors.

Buffers Versus Queues

The service bus buffers should not be equated with queues (such as MSMQ queues, discussed in Chapter 9), as there are a number of crucial differences:

  • The service bus buffers are not durable and the messages are stored in memory. This implies the risk of losing messages in the (somewhat unlikely) event of a catastrophic failure of the service bus itself.

  • The service bus buffers are not transactional and both sending and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required