Version 7

    +

    • Note:* JGroups is not thoroughly tested with JMS and JGroups doesn't recommend it!

    +

     

     

    Definition

    Transport protocol, using the Java Message Service (JMS). This implementation depends on the JMS server that will distribute messages published to the specific topic to all topic subscribers.

     

    Configuration Example

     

        <JMS topicName="topic/testDurableTopic" 
             cf="ConnectionFactory" 
             jndiCtx="org.jnp.interfaces.NamingContextFactory" 
             providerURL="localhost" 
             ttl="1000"></JMS>    
    

     

    Configuration Parameters

     

    {font:courier new

    topicName="topic/testDurableTopic"} Full JNDI name of Topic hosted by your JMS server. This is used for message publishing and subscribing.

     

     

    {font:courier new

    cf="ConnectionFactory"} Full JNDI name of the topic connection factory that will create topic connection. This is not mandatory, default value is "ConnectionFactory"

     

    {font:courier new

    jndiCtx="org.jnp.interfaces.NamingContextFactory"} value of the javax.naming.Context.INITIAL_CONTEXT_FACTORY property; you can specify it as the JVM system property -Djava.naming.factory.initial=factory.class.Name

     

    {font:courier new

    providerURL="localhost"} value of the javax.naming.Context.PROVIDER_URL property; you can specify it as the JVM system property -Djava.naming.provider.url=some_url

     

    {font:courier new

    ttl="1000"} Time to live in milliseconds. Default value is 0, that means that messages will never expire and will be accumulated by a JMS server.

     

    See also Protocol Configuration Common Parameters.

     

     

    +

    • Note:* There is a small bug in JMS which can be easily rectified. Look at JIRA JGRP-249

    +

     

    Complete Protocol stack

    <config>
        <JMS topicName="topic/testDurableTopic"
             cf="ConnectionFactory"
             jndiCtx="org.jnp.interfaces.NamingContextFactory"
             providerURL="localhost"
             ttl="100"></JMS>
        <PING timeout="2000" num_initial_members="3"></PING>    
        <FD timeout="2000" max_tries="4"></FD>
        <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"></VERIFY_SUSPECT>
        <pbcast.NAKACK gc_lag="100" retransmit_timeout="600,1200,2400,4800"></pbcast>
        <pbcast.STABLE stability_delay="1000" desired_avg_gossip="20000" down_thread="false" max_bytes="0" up_thread="false"></pbcast>
        <VIEW_SYNC avg_send_interval="60000" down_thread="false" up_thread="false" ></VIEW_SYNC>
        <pbcast.GMS print_local_addr="true" join_timeout="5000" join_retry_timeout="2000" shun="true"></pbcast>
    </config>
    

     

    The above configuration has been tested with jboss-4.0.4.GA.

     

    Back To JGroups