You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Akram <ak...@gmail.com> on 2015/04/01 01:01:04 UTC

Re: camel elasticsearch component

Any quick suggestions will be more helpful...



--
View this message in context: http://camel.465427.n5.nabble.com/camel-elasticsearch-component-tp5764662p5765090.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel elasticsearch component

Posted by Akram <ak...@gmail.com>.
Hi jakub,
Thanks for your reply. I did the same thing. Then it was working fine.



--
View this message in context: http://camel.465427.n5.nabble.com/camel-elasticsearch-component-tp5764662p5765540.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel elasticsearch component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi Jakub

Thanks for this. Its okay.
Though we like an unit test so it helps against regressions in the future.


On Fri, Apr 3, 2015 at 2:10 PM, Jakub Kotowski <ja...@sindicetech.com> wrote:
> Hi Akram,
>
> I've started to work with the Elasticsearch component recently so I had a
> look at it for you. It works correctly if you set the message headers.
>
> I've debugged it and there is a bug in the ElasticsearchProducer:
> https://github.com/apache/camel/blob/master/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchProducer.java#L112
>  ... it sets indexName instead of indexType as the message header.
>
> So for now you have to set the message headers for each message yourself
> (as described in the documentation of the component).
>
> I opened a JIRA issue about it:
> https://issues.apache.org/jira/browse/CAMEL-8597 and created a pull request
> with a fix: https://github.com/apache/camel/pull/466
>
> Claus, is this ok or do you require a unit test even for such a simple bug?
>
> Jakub
>
>
>
> On Thu, Apr 2, 2015 at 10:47 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> Did it work before? If not you are welcome to dive into the code to
>> see if you can find the issue/bug.
>> And you are welcome to log a JIRA and/or provide an unit test to
>> reproduce the issue.
>> http://camel.apache.org/support
>>
>> On Wed, Apr 1, 2015 at 1:01 AM, Akram <ak...@gmail.com> wrote:
>> > Any quick suggestions will be more helpful...
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/camel-elasticsearch-component-tp5764662p5765090.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: camel elasticsearch component

Posted by Jakub Kotowski <ja...@sindicetech.com>.
Hi Akram,

I've started to work with the Elasticsearch component recently so I had a
look at it for you. It works correctly if you set the message headers.

I've debugged it and there is a bug in the ElasticsearchProducer:
https://github.com/apache/camel/blob/master/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchProducer.java#L112
 ... it sets indexName instead of indexType as the message header.

So for now you have to set the message headers for each message yourself
(as described in the documentation of the component).

I opened a JIRA issue about it:
https://issues.apache.org/jira/browse/CAMEL-8597 and created a pull request
with a fix: https://github.com/apache/camel/pull/466

Claus, is this ok or do you require a unit test even for such a simple bug?

Jakub



On Thu, Apr 2, 2015 at 10:47 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Did it work before? If not you are welcome to dive into the code to
> see if you can find the issue/bug.
> And you are welcome to log a JIRA and/or provide an unit test to
> reproduce the issue.
> http://camel.apache.org/support
>
> On Wed, Apr 1, 2015 at 1:01 AM, Akram <ak...@gmail.com> wrote:
> > Any quick suggestions will be more helpful...
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/camel-elasticsearch-component-tp5764662p5765090.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>

Re: camel elasticsearch component

Posted by Claus Ibsen <cl...@gmail.com>.
Did it work before? If not you are welcome to dive into the code to
see if you can find the issue/bug.
And you are welcome to log a JIRA and/or provide an unit test to
reproduce the issue.
http://camel.apache.org/support

On Wed, Apr 1, 2015 at 1:01 AM, Akram <ak...@gmail.com> wrote:
> Any quick suggestions will be more helpful...
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-elasticsearch-component-tp5764662p5765090.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/