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 2016/09/14 20:40:30 UTC
camel seda queue log
I am using simple seda route and seeing that seda is using shared queue in
log.
Endpoint
Endpoint[seda://elasticSearchStore?concurrentConsumers=5&queueFactory=%23elasticsearchStoreLinkedQueue]
is using shared queue: seda://elasticSearchStore with size: 2147483647
2016-09-14 21:33:51,952 INFO SedaEndpoint:170 - Endpoint
Endpoint[seda://splunkStore?concurrentConsumers=10&queueFactory=%23splunkStoreLinkedQueue]
is using shared queue: seda://splunkStore with size: 2147483647
Why it is using shared queue, even though i have defined the queue. Any
suggestions will be more helpfule.
--
View this message in context: http://camel.465427.n5.nabble.com/camel-seda-queue-log-tp5787556.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel seda queue log
Posted by Brad Johnson <br...@mediadriver.com>.
Akram,
The fact that you are tokenizing to a String may make the shallow copy vs
deep copy less of a concern since String is immutable. Normally. But if
the Exchange itself is being shared and modifications to String resulting
in a new String and are shared via the Exchange then it is critical. I'd
have to dig into the bowels of the code of the Exchange more to know. Claus
would definitely have a better grasp on that than I.
I noticed that you are outputting to a splunkstore and elasticsearchstore
and sort of assumed these were write operations without mutation of the
underlying data but obviously that may be a bad "assumption".
By the way, the WireTap has this same issue. I've known folks to get into
trouble with that on occasion assuming that the WireTap made a clone of the
data when it is, in fact, shared. Personally I think the message clone
would be more in keeping with the use case of a WireTap but forcing that
could be a performance headache. That's especially true if you are just
using it to log or write out to a database for tracking purposes.
On Thu, Sep 15, 2016 at 1:03 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Yes the multicast does a shallow copy so its the same reference.
>
> You can use onPrepareRef where you can write some code that performs a
> deep copy of the message.
> http://camel.apache.org/multicast
>
>
>
> On Wed, Sep 14, 2016 at 11:31 PM, Akram <ak...@gmail.com> wrote:
> > I have tried using default queue mechanism. There also i am seeing the
> same
> > log "using shared queue". So trying to understand what it actually does
> > mean.
> >
> > Also I am sending same object to two different seda routes using
> multicast.
> > I wants to understand whether both routes use same object reference, as
> it
> > is using the shared queue.
> >
> > Here is my actual route.
> >
> > from("file://somefile")
> > .split(bodyAs(String.class).tokenize("\n"))
> > .multicast().to("seda:splunkstore","seda:elasticsearchstore");
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://camel.465427.n5.nabble.
> com/camel-seda-queue-log-tp5787556p5787559.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
Re: camel seda queue log
Posted by Claus Ibsen <cl...@gmail.com>.
Yes the multicast does a shallow copy so its the same reference.
You can use onPrepareRef where you can write some code that performs a
deep copy of the message.
http://camel.apache.org/multicast
On Wed, Sep 14, 2016 at 11:31 PM, Akram <ak...@gmail.com> wrote:
> I have tried using default queue mechanism. There also i am seeing the same
> log "using shared queue". So trying to understand what it actually does
> mean.
>
> Also I am sending same object to two different seda routes using multicast.
> I wants to understand whether both routes use same object reference, as it
> is using the shared queue.
>
> Here is my actual route.
>
> from("file://somefile")
> .split(bodyAs(String.class).tokenize("\n"))
> .multicast().to("seda:splunkstore","seda:elasticsearchstore");
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-seda-queue-log-tp5787556p5787559.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Re: camel seda queue log
Posted by Akram <ak...@gmail.com>.
I have tried using default queue mechanism. There also i am seeing the same
log "using shared queue". So trying to understand what it actually does
mean.
Also I am sending same object to two different seda routes using multicast.
I wants to understand whether both routes use same object reference, as it
is using the shared queue.
Here is my actual route.
from("file://somefile")
.split(bodyAs(String.class).tokenize("\n"))
.multicast().to("seda:splunkstore","seda:elasticsearchstore");
--
View this message in context: http://camel.465427.n5.nabble.com/camel-seda-queue-log-tp5787556p5787559.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel seda queue log
Posted by Brad Johnson <br...@mediadriver.com>.
https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
By the way if you look in there you can see where the log statement comes
from in the createQueue method.
On Wed, Sep 14, 2016 at 3:40 PM, Akram <ak...@gmail.com> wrote:
> I am using simple seda route and seeing that seda is using shared queue in
> log.
>
> Endpoint
> Endpoint[seda://elasticSearchStore?concurrentConsumers=5&queueFactory=%
> 23elasticsearchStoreLinkedQueue]
> is using shared queue: seda://elasticSearchStore with size: 2147483647
> 2016-09-14 21:33:51,952 INFO SedaEndpoint:170 - Endpoint
> Endpoint[seda://splunkStore?concurrentConsumers=10&queueFactory=%
> 23splunkStoreLinkedQueue]
> is using shared queue: seda://splunkStore with size: 2147483647
>
> Why it is using shared queue, even though i have defined the queue. Any
> suggestions will be more helpfule.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/camel-seda-queue-log-tp5787556.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: camel seda queue log
Posted by Brad Johnson <br...@mediadriver.com>.
I'm not sure what is happening inside your queueFactory but is there a
particular reason you need a queue factory and not just use the default
queue? There could be, obviously, if you need to create some sort of
priority queue or other mechanism but it isn't necessary otherwise.
Brad
On Wed, Sep 14, 2016 at 3:40 PM, Akram <ak...@gmail.com> wrote:
> I am using simple seda route and seeing that seda is using shared queue in
> log.
>
> Endpoint
> Endpoint[seda://elasticSearchStore?concurrentConsumers=5&queueFactory=%
> 23elasticsearchStoreLinkedQueue]
> is using shared queue: seda://elasticSearchStore with size: 2147483647
> 2016-09-14 21:33:51,952 INFO SedaEndpoint:170 - Endpoint
> Endpoint[seda://splunkStore?concurrentConsumers=10&queueFactory=%
> 23splunkStoreLinkedQueue]
> is using shared queue: seda://splunkStore with size: 2147483647
>
> Why it is using shared queue, even though i have defined the queue. Any
> suggestions will be more helpfule.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/camel-seda-queue-log-tp5787556.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>