0

With the below code I am trying to send messages other application. In Tomcat, working fine - messages sent is equal to messages received in jconsole. but when I deploy in weblogic, found sent message count is not matching with received count in jconsole means some messages are missed.

@ManagedResource
public class OBSNotificationPublisher{
    @Autowired
     private MessageChannel channel; 
    Message <?> message = MessageBuilder.withPayload( obj ).setHeader(JmxHeaders.NOTIFICATION_TYPE, notficationType ).build();<br>
    channel.send( message );
}


**applicationcontext.xml**
<?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:context="http://www.springframework.org/schema/context"
       xmlns:si="http://www.springframework.org/schema/integration"
       xmlns:jmx="http://www.springframework.org/schema/integration/jmx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/integration
            http://www.springframework.org/schema/integration/spring-integration.xsd
            http://www.springframework.org/schema/integration/jmx
            http://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd">

    <context:mbean-server/>

    <context:mbean-export/>
    <si:message-history/>

    <si:channel id="channel"/>
    <jmx:notification-publishing-channel-adapter
            id="adapter" channel="channel"
            object-name="obs.jmx.publisher:name=obsNotificationPublisher"
            default-notification-type="default.type">
    </jmx:notification-publishing-channel-adapter>
<bean id="obsNotificationPublisher" class="com.obs.eas.jmx.publisher.OBSNotificationPublisher" />
</beans>

Below are the weblogic server args used :

-Dweblogic.wsee.skip.async.response=true -Dcom.sun.management.jmxremote.port=6666 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.autodiscovery=true -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder

Can someone here help me why some messages are missed that are put in the channel ?? missing count is random for every run. thanks in advance.

Ali Akbarpour
  • 958
  • 2
  • 18
  • 35
Phani Kumar
  • 61
  • 2
  • 10
  • Can you `try...catch()` that `channel.send( message );` and log a possible exception? Also try to turn on `DEBUG` logging level for the `org.springframework.integration` to have some info in logs for analyze. – Artem Bilan Apr 09 '18 at 14:20
  • 1
    Yeah @ArtemBilan , i added try...catch() and verified also. there is no caught exceptions. for every execution of channel.send( message ) returning true which means messages are send to channel. – Phani Kumar Apr 09 '18 at 14:37
  • Yeah... No ideas. If your channel is really a `DirectChannel` and there is no any clues in the DEBUG logs, then only the choice to contact with Weblogic support to determine the reason of missed JMX notifications. – Artem Bilan Apr 09 '18 at 14:45

0 Answers0