You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "onder sezgin (JIRA)" <ji...@apache.org> on 2017/03/07 08:21:32 UTC

[jira] [Commented] (CAMEL-9552) Cannot consume and produce to beanstalk component in the same route

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

onder sezgin commented on CAMEL-9552:
-------------------------------------

Instead of setting camel exhange's headers in both beanstalkproducer and beanstalkconsumer as
{code}
exchange.getIn().setHeader(Headers.JOB_ID, job.getJobId())
{code}
which is 
Headers.JOB_ID -> "beanstalk.jobId"; (which is actually Headers.PREFIX+"jobId")

maybe we can change the lines where we set camel exchange's headers
like

{code}
exchange.getIn().setHeader(Headers.PREFIX+"producer."+"jobId", job.getJobId())
{code}

however, This suggestion requires a lot of code change.

Thinking of a simpler code change to avoid such a huge change which may break existing codes of this component's users.



> Cannot consume and produce to beanstalk component in the same route
> -------------------------------------------------------------------
>
>                 Key: CAMEL-9552
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9552
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.15.0, 2.16.0
>            Reporter: J Smith
>            Assignee: onder sezgin
>
> It appears that when creating a route that consumes from one beanstalk tube and produces to another, the exchange headers from the consumer somehow get mixed in with the producer and cause errors.
> Example route:
> .from("beanstalk://localhost?tube=A")
> .setBody("hello")
> .to("beanstalk://localhost?tube=B")



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)