-1

I am facing issue while publishing JMS message on Solace server topic. Actually we are successfully able to send message using jmsTemplate.send() method. But unable to see the message count on solace client GUI. Below is my solace configuration.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
                           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd">

    <bean
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:messaging.properties</value>
            </list>
        </property>
        <property name="ignoreResourceNotFound" value="true" />
        <property name="ignoreUnresolvablePlaceholders" value="true" />
    </bean>

    <!-- Solace Broker Configuration Details -->

    <bean id="solaceJndiTemplate" class="org.springframework.jndi.JndiTemplate"
        lazy-init="default" autowire="default">
        <property name="environment">
            <map>
                <entry key="java.naming.provider.url" value="${solace.url}" />
                <entry key="java.naming.factory.initial"
                    value="com.solacesystems.jndi.SolJNDIInitialContextFactory" />
                <entry key="java.naming.security.principal" value="${solace.userName}" />
                <entry key="java.naming.security.credentials" value="${solace.passWord}" />
            </map>
        </property>
    </bean>
    <bean id="solaceConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"
        lazy-init="default" autowire="default">
        <property name="jndiTemplate" ref="solaceJndiTemplate" />
        <property name="jndiName" value="${solace.jndiName}" />
    </bean>
    <!-- <bean id="solaceCachedConnectionFactory"
        class="org.springframework.jms.connection.CachingConnectionFactory">
        <property name="targetConnectionFactory" ref="solaceConnectionFactory" />
        <property name="sessionCacheSize" value="10" />
    </bean> -->
    <bean id="destination" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiTemplate" ref="solaceJndiTemplate" />
        <property name="jndiName" value="${solace.topic}" />
    </bean>

    <!-- <bean id="topicDestination" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiTemplate" ref="solaceJndiTemplate" />
        <property name="jndiName" value="${solace.topic}" />
    </bean> -->

    <bean id="solaceQueueJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory" ref="solaceConnectionFactory" />
        <property name="defaultDestination" ref="destination" />
        <property name="deliveryPersistent" value="false" />
        <property name="explicitQosEnabled" value="true" />
         <property name="pubSubDomain" value="false"/>
    </bean>

    <bean id="solaceTopicJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory" ref="solaceConnectionFactory" />
        <property name="defaultDestination" ref="destination" />
        <property name="deliveryPersistent" value="false" />
        <property name="explicitQosEnabled" value="true" />
         <property name="pubSubDomain" value="true"/>
    </bean>

    <bean id="solaceQueueBroker" class="com.isc.common.messaging.SolaceUtilityHelper">
        <property name="jmsTemplate" ref="solaceQueueJmsTemplate" />
    </bean>

    <bean id="solaceTopicBroker" class="com.isc.common.messaging.SolaceUtilityHelper">
        <property name="jmsTemplate" ref="solaceTopicJmsTemplate" />
    </bean>

    <bean id="messageBroker" class="com.isc.common.messaging.SolaceUtilityHelper">
        <property name="activeBroker" value="${active.broker}" />
    </bean>


    <!-- <bean id="messageConsumer" class="com.isc.common.messaging.MessageConsumer">
    </bean>
    <bean id="jmsContainer"
        class="org.springframework.jms.listener.DefaultMessageListenerContainer">
        <property name="connectionFactory" ref="solaceCachedConnectionFactory" />
        <property name="destination" ref="destination" />
        <property name="messageListener" ref="messageConsumer" />
    </bean> -->
</beans>

please can any one suggest me solution for this.

Thanks in advance. Saurabh Mahajan

1 Answers1

0

Based on your comments, it would appear that you are publishing to a topic, but there are no endpoints configured to spool the message.

You can refer to at Adding Topic Subscriptions to Queues for details on how to configure an queue to spool messages that are published to a topic.

To confirm, you can verify whether messages are listed under the "No Subscription Match Logs". In SolAdmin, you can view them by heading to "Logging & Diagnostics" and selecting the "No Subscription Match Logs". The corresponding CLI command for this is show log no-subscription-match

Also, the statistics of your application connection would also display the number of messages received and sent, with any discard reasons. This can be viewed by heading to the "Clients" tab, and selecting the "Client" view. Then, double click on your client and head to "Statistics". Alternatively, the CLI command for this is show client <your-client-name> message-vpn <your-vpn-name> stats

Russell Sim
  • 1,693
  • 2
  • 14
  • 22