You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by saurabhmehan <sa...@gmail.com> on 2013/06/07 19:51:16 UTC

Camel SMPP component question

Dears,


I am using Camel SMPP component for Deliver SM and Submit SM. Submit SM is
working fine. But whenever multiple Deliver SM(MO - Mobile Originated)
requests comes to SMPP End Point then all of them are not processed by camel
exchange as some of them got discarded as they did not processed by
exchange. If each component of camel is multi threaded so why it is not
handling multiple requests simultaneously. Is there any place where can we
exceed the number of threads or configure number of threads to process
multiple request simultaneously. How can we improve the configuration to
handle heavy load for performance testing. 


For example I have sent 50 Deliver SM(MO - Mobile Originated) requests from
simulator then 40 of them got processed and 10 of them are discarded
exchange does not process the request.

Find my sample code for reference below:
  
@Override
	public void configure() throws Exception {
		onException(Exception.class).handled(false).bean(new
SmsGeneralExceptionProcessor(), "process");
				
		from(smppEndpoint)
			.process(new SmsMessageProcessor(channelMessagesBean))
}


Please guide me.....

Thanks & Regards
Saurabh Mehan



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel SMPP component question

Posted by saurabhmehan <sa...@gmail.com>.
SmsMessageProcessor.java
<http://camel.465427.n5.nabble.com/file/n5734035/SmsMessageProcessor.java>  

Hi Christian,


Please find the SmsMessage Processor as an attachment. I have not tried
thread() DSL element. Please guide me how can it be helpful for my case??


Thanks & Regards
Saurabh Mehan



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734035.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel SMPP component question

Posted by Christian Müller <ch...@gmail.com>.
In this case camel is not discarding the messages. May the JSMPP library we
use in this component, but I doubt.
Can you provide a complete unit test set up to show the issue? Because I
cannot reproduce it, neither with the SMPPSim nor with an unit test, I
don't know what else I can do here.

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Sun, Jun 16, 2013 at 6:25 PM, saurabhmehan <sa...@gmail.com>wrote:

> Hi Christian Mueller,
>
> In my camel logs I don't see any message processing. May be camel is
> discarding the messages. I am sending 20 request simultaneously with delay
> of 500ms for 15 mins(900 secs). May be camel has limit to process the
> Deliver_sm packets in one go. Is there any configuration of threads that
> processes requests in camel. As exchange is unable to process all the
> messages.
>
> ChannelMessageBean is nothing but loading the properties from configuration
> file.
>
> Thanks & Regards
> Saurabh Mehan
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734246.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Re: Camel SMPP component question

Posted by saurabhmehan <sa...@gmail.com>.
Hi Christian Mueller,

In my camel logs I don't see any message processing. May be camel is
discarding the messages. I am sending 20 request simultaneously with delay
of 500ms for 15 mins(900 secs). May be camel has limit to process the
Deliver_sm packets in one go. Is there any configuration of threads that
processes requests in camel. As exchange is unable to process all the
messages.

ChannelMessageBean is nothing but loading the properties from configuration
file. 

Thanks & Regards
Saurabh Mehan




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734246.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel SMPP component question

Posted by Christian Müller <ch...@gmail.com>.
Hello Saurabh!

I cannot reproduce your issue. I created a simple Camel route which only
logs the body of the received DeliverSM message:

public class SmppUserIssueIntegrationTest extends CamelTestSupport {

    @Test
    public void sendDataSM() throws Exception {
        Thread.sleep(60000 * 60);
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                from("smpp://smppclient@localhost
:2775?password=password&enquireLinkTimer=3000&transactionTimer=5000&systemType=consumer")
                    .log("processing exchange ${body}");
            }
        };
    }
}

>From my SMSC test client (using Selenium SMPPSim), I sent multiple
DeliverSM messages and all are received in the Camel route:

...
2013-06-16 17:24:40,209 [pool-1-thread-1] DEBUG
MessageReceiverListenerImpl    - Received a deliverSm PDUHeader(73,
00000005, 00000000, 69)
2013-06-16 17:24:40,209 [pool-1-thread-1] INFO
route1                         - processing exchange Hello from SMPPSim
2013-06-16 17:24:40,394 [pool-1-thread-2] DEBUG
MessageReceiverListenerImpl    - Received a deliverSm PDUHeader(73,
00000005, 00000000, 70)
2013-06-16 17:24:40,394 [pool-1-thread-2] INFO
route1                         - processing exchange Hello from SMPPSim
2013-06-16 17:24:40,623 [pool-1-thread-3] DEBUG
MessageReceiverListenerImpl    - Received a deliverSm PDUHeader(73,
00000005, 00000000, 71)
2013-06-16 17:24:40,624 [pool-1-thread-3] INFO
route1                         - processing exchange Hello from SMPPSim


You write "that Deliver_sm packet is not processed by the camel exchange".
Still not clear for me what do you mean exactly. Do you not see the log
output "Processing SMS exchange : ..." for this message?

Do you see any other log message? E.g. "Received a deliverSm ..."? This is
the log message Camel logs (on DEBUG) when it receives an message. If you
cannot see this log message for the missing messages, I'm afraid this is an
issue in the underlying JSMPP library we are using.

May be one of your multiple "if" statements are not correct?

Is your ChannelMessagesBean thread safe?

Best,

Christian Müller
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Sun, Jun 16, 2013 at 10:20 AM, saurabhmehan <sa...@gmail.com>wrote:

> Hi Christian,
>
> Please find the valid link as follows for code:
> http://camel.465427.n5.nabble.com/file/n5734036/SmsMessageProcessor.java
>
>
> "When I say the message is discarded", I figured out this case by analyzing
> tcpdump from both servers as follows:
> 1. Sent MO(Mobile Originated) SMS that is Deliver_sm packet from the
> simulator installed on one server.
> 2. To the receiver server where SMPP EndPoint is configured using camel.
> 3. The Deliver_sm request is received on the server where camel smpp
> endpoint is configured(confirmed from snoop taken on the receiver server
> where smpp endpoint is configured.)
> 4. But that Deliver_sm packet is not processed by the camel exchange.
>
> Please find the snoop as an attachment.
> Refer 477128 sequence number.(Type : *smpp.sequence_number == 477128* in
> the
> filter field of wireshark.)
>
> SmS_SO3_2.pcap
> <http://camel.465427.n5.nabble.com/file/n5734242/SmS_SO3_2.pcap>
>
>
> Thanks & Regards
> Saurabh Mehan
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734242.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Re: Camel SMPP component question

Posted by saurabhmehan <sa...@gmail.com>.
Hi Christian,

Please find the valid link as follows for code:
http://camel.465427.n5.nabble.com/file/n5734036/SmsMessageProcessor.java


"When I say the message is discarded", I figured out this case by analyzing
tcpdump from both servers as follows:
1. Sent MO(Mobile Originated) SMS that is Deliver_sm packet from the
simulator installed on one server.
2. To the receiver server where SMPP EndPoint is configured using camel.
3. The Deliver_sm request is received on the server where camel smpp
endpoint is configured(confirmed from snoop taken on the receiver server
where smpp endpoint is configured.)
4. But that Deliver_sm packet is not processed by the camel exchange.

Please find the snoop as an attachment.
Refer 477128 sequence number.(Type : *smpp.sequence_number == 477128* in the
filter field of wireshark.)

SmS_SO3_2.pcap
<http://camel.465427.n5.nabble.com/file/n5734242/SmS_SO3_2.pcap>  


Thanks & Regards
Saurabh Mehan



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734242.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel SMPP component question

Posted by Christian Müller <ch...@gmail.com>.
[1] isn't a valid link to your SmsMessageProcessor. Please attach it again
to receive help...

When you say "as some of them got discarded", how do you figured it out? Is
there an error log entry?

Are you able to attach a unit test which shows this issue? This make it
much more easier for me to dig into the issue and provide a fix in short
time.

[1] http://camel.465427.n5.nabble.com/file/n5734035/SmsMessageProcessor.java

Best,

Christian Müller
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Sat, Jun 8, 2013 at 11:33 AM, saurabhmehan <sa...@gmail.com>wrote:

> Hi Christian,
>
>
> Please find the SmsMessage Processor as an attachment. I have not tried
> thread() DSL element. Please guide me how can it be helpful for my case??
>
>
> Thanks & Regards
> Saurabh Mehan
> SmsMessageProcessor.java
> <http://camel.465427.n5.nabble.com/file/n5734036/SmsMessageProcessor.java>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734036.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Re: Camel SMPP component question

Posted by saurabhmehan <sa...@gmail.com>.
Hi Christian, 


Please find the SmsMessage Processor as an attachment. I have not tried
thread() DSL element. Please guide me how can it be helpful for my case?? 


Thanks & Regards 
Saurabh Mehan
SmsMessageProcessor.java
<http://camel.465427.n5.nabble.com/file/n5734036/SmsMessageProcessor.java>  



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019p5734036.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel SMPP component question

Posted by Christian Müller <ch...@gmail.com>.
I'm traveling right now. Will come back to you later...

But can you also share your SmsMessageProcessor bean?

Did you try the threads() DSL element?

Best,

Sent from a mobile device
Am 08.06.2013 08:38 schrieb "saurabhmehan" <sa...@gmail.com>:

> Dears,
>
>
> I am using Camel SMPP component for Deliver SM and Submit SM. Submit SM is
> working fine. But whenever multiple Deliver SM(MO - Mobile Originated)
> requests comes to SMPP End Point then all of them are not processed by
> camel
> exchange as some of them got discarded as they did not processed by
> exchange. If each component of camel is multi threaded so why it is not
> handling multiple requests simultaneously. Is there any place where can we
> exceed the number of threads or configure number of threads to process
> multiple request simultaneously. How can we improve the configuration to
> handle heavy load for performance testing.
>
>
> For example I have sent 50 Deliver SM(MO - Mobile Originated) requests from
> simulator then 40 of them got processed and 10 of them are discarded
> exchange does not process the request.
>
> Find my sample code for reference below:
>
> @Override
>         public void configure() throws Exception {
>                 onException(Exception.class).handled(false).bean(new
> SmsGeneralExceptionProcessor(), "process");
>
>                 from(smppEndpoint)
>                         .process(new
> SmsMessageProcessor(channelMessagesBean))
> }
>
>
> Please guide me.....
>
> Thanks & Regards
> Saurabh Mehan
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-SMPP-component-question-tp5734019.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>