[ 
https://issues.apache.org/jira/browse/CAMEL-9087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-9087.
--------------------------------
       Resolution: Fixed
         Assignee: Claus Ibsen
    Fix Version/s: 2.15.4
                   2.16.0

Thanks for the patch.

> camel-pgevent payload always null
> ---------------------------------
>
>                 Key: CAMEL-9087
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9087
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.15.2
>         Environment: PostgreSQL 9.4.4
>            Reporter: Marek Schmidt
>            Assignee: Claus Ibsen
>              Labels: camel-pgevent
>             Fix For: 2.16.0, 2.15.4
>
>         Attachments: pgevent.patch
>
>
> (note, camel-pgevent doesn't seem to have a component listed in JIRA)
> Having the following reproducer
> {code}
> @ContextName("myCdiCamelContext")
> public class MyRoutes extends RouteBuilder {
>     @Inject
>     
> @Uri("pgevent://localhost:5432/postgres/foobar?user=postgres&pass=mysecretpassword")
>     private Endpoint listenEndpoint;
>     @Inject
>     
> @Uri("pgevent://localhost:5432/postgres/foobar?user=postgres&pass=mysecretpassword")
>     private Endpoint notifyEndpoint;
>     @Inject
>     @Uri("timer:foo?period=5000")
>     private Endpoint timerEndpoint;
>     @Inject
>     @Uri("log:output")
>     private Endpoint resultEndpoint;
>     @Inject
>     private SomeBean someBean;
>     @Override
>     public void configure() throws Exception {
>         from(timerEndpoint)
>                 .transform().simple("hello")
>                 .to(notifyEndpoint);
>         from(listenEndpoint)
>             .to(resultEndpoint);
>     }
> }
> {code}
> together with
> {code}
> docker run --name some-postgres -p 5432:5432 -e 
> POSTGRES_PASSWORD=mysecretpassword -d postgres
> {code}
> the notify payload is always null
> {noformat}
> 2015-08-19 08:40:51,216 [0 - timer://foo] DEBUG SendProcessor                 
>  - >>>> 
> Endpoint[pgevent://localhost:5432/postgres/foobar?pass=mysecretpassword&user=postgres]
>  Exchange[Message: hello]
> 2015-08-19 08:40:51,227 [C EventLoop (2)] DEBUG SendProcessor                 
>  - >>>> Endpoint[log://output] Exchange[Message: null]
> 2015-08-19 08:40:51,228 [C EventLoop (2)] INFO  output                        
>  - Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2015-08-19 08:40:56,199 [0 - timer://foo] DEBUG SendProcessor                 
>  - >>>> 
> Endpoint[pgevent://localhost:5432/postgres/foobar?pass=mysecretpassword&user=postgres]
>  Exchange[Message: hello]
> 2015-08-19 08:40:56,200 [C EventLoop (2)] DEBUG SendProcessor                 
>  - >>>> Endpoint[log://output] Exchange[Message: null]
> 2015-08-19 08:40:56,201 [C EventLoop (2)] INFO  output                        
>  - Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2015-08-19 08:41:01,199 [0 - timer://foo] DEBUG SendProcessor                 
>  - >>>> 
> Endpoint[pgevent://localhost:5432/postgres/foobar?pass=mysecretpassword&user=postgres]
>  Exchange[Message: hello]
> 2015-08-19 08:41:01,201 [C EventLoop (2)] DEBUG SendProcessor                 
>  - >>>> Endpoint[log://output] Exchange[Message: null]
> 2015-08-19 08:41:01,201 [C EventLoop (2)] INFO  output                        
>  - Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> {noformat}
> It seems that the camel-pgevent consumer uses 
> outOnly.setOut(msg);
> instead of 
> outOnly.setIn(msg);
> and the producer
> exchange.getOut()
> instead of 
> exchange.getIn()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to