Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
<composite name="ProducerComposite" ...>

    <component name="TestProducer">
        <implementation.java class="..."/>
        <producer name="channel" target="TestChannel"/>
    </component>

</composite>

<composite name="ChannelComposite"...>

    <channel name="TestChannel">
        <f3:binding.zeromq/>
    </channel>

</composite>

<composite name="ConsumerComposite" ...>

    <component name="TestConsumer">
        <implementation.java class="..."/>
        <consumer name="channel" source="TestChannel"/>
    </component>

</composite>

 

 

Using ZeroMQ as the SCA Binding

Typically, ZeroMQ is used as the default remote transport when no binding is configured (the "default" binding is called the SCA binding, or "binding.sca"). When used in this fashion, Fabric3 will automatically provision ZeroMQ sockets as well as propagate socket address information across clusters so that remote clients can connect. In addition, if socket address information changes (e.g. a runtime joins a cluster or drops out), this information will be automatically propagated and updates applied across clusters.

Assuming the ZeroMQ profile is installed in a runtime, the following example demonstrates how ZeroMQ can be used as the SCA binding:

...

<composite name="ClientComposite" ...>

    <component name="TestProducer">
        <implementation.java class="..."/>
        <reference name="service" target="TestService"/>
    </component>

</composite>

<composite name="ServiceComposite" ...>

    <component name="TestService">
        <implementation.java class="..."/>
    </component>

</composite>

Notice there is no binding configuration. If the ClientComposite and ServiceComposite are deployed to different zones, Fabric3 will create the appropriate ZeroMQ socket type to wire the components. The socket type chose will depend on the service contract. For example, a service contract with @OneWay operations will create a ZeroMQ non-blocking socket (ZMQ.PUSH). However, if the service contract has request-reply operations, a ZeroMQ request-response (ZMQ.XREQ) socket is created. Similarly, if the service interface requires a callback, Fabric3 will create a callback socket for replies.

Configuration

The following ZeroMQ values may be configured as attributes on the <f3:zeromq.binding> element contained in the controller and single-VM configurations (systemConfig.xml):

  • high.water
  • multicastRate
  • multicastRecovery
  • sendBuffer
  • receiveBuffer

The following ZeroMQ values may be configured as attributes on the <f3:zeromq.binding> element contained in the participant and single-VM configurations:

  • pollTimeout
Port Allocation

The ZeroMQ binding attempts to acquire ports for sockets from the block configured for a particular runtime or zone. For information on how to configure a port block, see Port Allocation.

Multi-Homed Configuration

...

Connecting to External Event Streams