You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christian Müller (JIRA)" <ji...@apache.org> on 2013/01/12 13:42:12 UTC

[jira] [Comment Edited] (CAMEL-5708) Make camel-smpp component get username from parameters instead of address

    [ https://issues.apache.org/jira/browse/CAMEL-5708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13551906#comment-13551906 ] 

Christian Müller edited comment on CAMEL-5708 at 1/12/13 12:41 PM:
-------------------------------------------------------------------

I plan to implement it in the way that if you use lazySessionCreation=true Camel will look up the in message header "CamelSmppSystemId" and "CamelSmppPassword" in the first exchange which receives at this producer. If both are present, Camel will use this system id (user name) and password to connect to the SMSC.

 [~psalnikov]: I think the best solution for your requirement is to use a producer template in a bean and build your SMPP endpoint url dynamicly. Than you can use the producer template like
{code}
Template template = context.createProducerTemplate();
Exchange result = template.request(endpointString, processor);
String messageId = result.getOut().getHeader("CamelSmppId", String.class);
...
{code}
                
      was (Author: muellerc):
    I plan to implement it in the way that if you use lazySessionCreation=true Camel will look up the in message header "CamelSmppSystemId" and "CamelSmppPassword". If both are present, Camel will use this system id (user name) and password to connect to the SMSC.

 [~psalnikov]: I think the best solution for your requirement is to use a producer template in a bean and build your SMPP endpoint url dynamicly. Than you can use the producer template like
{code}
Template template = context.createProducerTemplate();
Exchange result = template.request(endpointString, processor);
String messageId = result.getOut().getHeader("CamelSmppId", String.class);
...
{code}
                  
> Make camel-smpp component get username from parameters instead of address
> -------------------------------------------------------------------------
>
>                 Key: CAMEL-5708
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5708
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-smpp
>    Affects Versions: 2.10.1
>            Reporter: Peter Salnikov
>            Assignee: Christian Müller
>            Priority: Minor
>             Fix For: 2.11.0
>
>
> Currently camel-smpp component gets username from address part of an uri
> username@hostname
> it's no ok when username is empty, because in that case I can't configure URI from properties
> <inOnly uri="smpp://{{smpp.username}}@{{smpp.address}}?password={{smpp.password}}"/>
> It will be more convenient and standard based if username will be passed via options:
> <inOnly uri="smpp://{{smpp.address}}?username={{smpp.username}}&amp;password={{smpp.password}}"/>
> in that case it will be easy and readable to put value to options file:
> smpp.address=127.0.0.1:2775
> smpp.username=
> smpp.password=
> smpp.from=3113

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira