JasperFx 0.9.13


Local Loopback Transport


Messaging Transports

TCP Transport Edit on GitHub

Note! This transport works by sending traffic directly via sockets and may not be acceptable in your IT department policies. We are pursuing the usage of JWT's to secure the traffic between applications using the socket based transports, see the GitHub issue

Lightweight, fire and forget

The TCP transport without durability is meant for scenarios where message delivery speed and throughput is important and guaranteed delivery is not required. We originally conceived this option as a .Net equivalent to ZeroMQ.

To set up a Jasper application to listen for incoming and outgoing messages through the TCP transport in the lightweight mode, see this example:

public class LightweightTransportApp : JasperRegistry
    public LightweightTransportApp()
        // Set up a listener (this is optional)

        // Or do the exact same thing by supplying a Uri

        // Publish the message Message2 to the DNS entry "remoteserver"

In the case of a failure to send a message, the lightweight transport will retry to send the message a few times (3 is the default), but the message will be permanently discarded in about 10 seconds if it is unsuccessful. The lightweight transport is useful for control messages or messages that have a very limited value in terms of time. My shop uses this transport for frequent status update messages that are very quickly obsolete.

Durable TCP Messaging

First, see Store and Forward Messaging about how message durability is enabled and functions within Jasper.

The TCP transport can be used durably as both listener or sender. To configure a durable TCP listener, use one of these options:

public class DurableTransportApp : JasperRegistry
    public DurableTransportApp()
        // Set up a listener (this is optional)

        // Or, alternatively set up durable listening by Uri

        // Or, alternatively set up durable listening by Uri

        // With the RabbitMQ transport

Note here that the Uri's durable://server:port and tcp://server:port/durable are considered as equivalents by Jasper.