You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ephemeris Lappis <ep...@gmail.com> on 2023/01/09 17:38:26 UTC
Camel 3.X / Custom event notifier : expected events are not recieved
Hello.
Still working on porting old code from Camel 2.X to Camel 3.X, I have
a new issue. The EventNotifier in Camel 3.X is slightly refactored,
and I can't get the events I expect although my settings seem correct.
I'd like to get only event of Type :
- ExchangeCreated
- ExchangeFailed
- ExchangeCompleted
- ExchangeSent
I understand that for Exchange* events I have to accept ExchangeEvent.
But When I try to exclude ExchangeSending, ExchangeSent is not fired
anymore.
Here is my class :
public class MyEventNotifier extends EventNotifierSupport {
private Logger logger = LoggerFactory.getLogger(MyEventNotifier.class);
public MyEventNotifier() {
setIgnoreCamelContextInitEvents(true);
setIgnoreCamelContextEvents(true);
setIgnoreRouteEvents(true);
setIgnoreExchangeAsyncProcessingStartedEvents(true);
// setIgnoreExchangeSendingEvents(true);
}
I've looked at the super classes, and I don't understand why Sent and
Sending should be linked...
Any ideas ? FYI I've tested it with 3.20.0 and 3.20.1, and both fail...
For now I can ignore ExchangeSending events, but I'd prefer to
understand how it works...
Thanks for your help.
Regards.
Re: Camel 3.X / Custom event notifier : expected events are not recieved
Posted by Ephemeris Lappis <ep...@gmail.com>.
Hello.
Do you confirm that ExchangeFailureHandling and ExchangeFailureHandled
are also sent with ExchangeFailed ?
Thanks.
Regards.
Le lun. 9 janv. 2023 à 19:06, Claus Ibsen <cl...@gmail.com> a écrit :
>
> Yes just ignore the sending event
>
> On Mon, Jan 9, 2023 at 7:02 PM Ephemeris Lappis <ep...@gmail.com>
> wrote:
>
> > Hello.
> >
> > So the best way to get my expected events is with my settings, and
> > just ignoring "ExchangeSendingEvent", right ?
> > Could you please confirm that no other event type that I had not
> > already seen in my tests is linked to the selected ones ?
> >
> > Thanks for your help.
> >
> > Regards.
> >
> > Le lun. 9 janv. 2023 à 18:57, Claus Ibsen <cl...@gmail.com> a écrit
> > :
> > >
> > > Its optimized in core for these to be paired
> > >
> > > On Mon, Jan 9, 2023 at 6:38 PM Ephemeris Lappis <
> > ephemeris.lappis@gmail.com>
> > > wrote:
> > >
> > > > Hello.
> > > >
> > > > Still working on porting old code from Camel 2.X to Camel 3.X, I have
> > > > a new issue. The EventNotifier in Camel 3.X is slightly refactored,
> > > > and I can't get the events I expect although my settings seem correct.
> > > >
> > > > I'd like to get only event of Type :
> > > > - ExchangeCreated
> > > > - ExchangeFailed
> > > > - ExchangeCompleted
> > > > - ExchangeSent
> > > >
> > > > I understand that for Exchange* events I have to accept ExchangeEvent.
> > > > But When I try to exclude ExchangeSending, ExchangeSent is not fired
> > > > anymore.
> > > >
> > > > Here is my class :
> > > >
> > > > public class MyEventNotifier extends EventNotifierSupport {
> > > >
> > > > private Logger logger = LoggerFactory.getLogger(MyEventNotifier.class);
> > > >
> > > > public MyEventNotifier() {
> > > > setIgnoreCamelContextInitEvents(true);
> > > > setIgnoreCamelContextEvents(true);
> > > > setIgnoreRouteEvents(true);
> > > > setIgnoreExchangeAsyncProcessingStartedEvents(true);
> > > > // setIgnoreExchangeSendingEvents(true);
> > > > }
> > > >
> > > > I've looked at the super classes, and I don't understand why Sent and
> > > > Sending should be linked...
> > > >
> > > > Any ideas ? FYI I've tested it with 3.20.0 and 3.20.1, and both fail...
> > > >
> > > > For now I can ignore ExchangeSending events, but I'd prefer to
> > > > understand how it works...
> > > >
> > > > Thanks for your help.
> > > >
> > > > Regards.
> > > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > @davsclaus
> > > Camel in Action 2: https://www.manning.com/ibsen2
> >
>
>
> --
> Claus Ibsen
> -----------------
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel 3.X / Custom event notifier : expected events are not recieved
Posted by Claus Ibsen <cl...@gmail.com>.
Yes just ignore the sending event
On Mon, Jan 9, 2023 at 7:02 PM Ephemeris Lappis <ep...@gmail.com>
wrote:
> Hello.
>
> So the best way to get my expected events is with my settings, and
> just ignoring "ExchangeSendingEvent", right ?
> Could you please confirm that no other event type that I had not
> already seen in my tests is linked to the selected ones ?
>
> Thanks for your help.
>
> Regards.
>
> Le lun. 9 janv. 2023 à 18:57, Claus Ibsen <cl...@gmail.com> a écrit
> :
> >
> > Its optimized in core for these to be paired
> >
> > On Mon, Jan 9, 2023 at 6:38 PM Ephemeris Lappis <
> ephemeris.lappis@gmail.com>
> > wrote:
> >
> > > Hello.
> > >
> > > Still working on porting old code from Camel 2.X to Camel 3.X, I have
> > > a new issue. The EventNotifier in Camel 3.X is slightly refactored,
> > > and I can't get the events I expect although my settings seem correct.
> > >
> > > I'd like to get only event of Type :
> > > - ExchangeCreated
> > > - ExchangeFailed
> > > - ExchangeCompleted
> > > - ExchangeSent
> > >
> > > I understand that for Exchange* events I have to accept ExchangeEvent.
> > > But When I try to exclude ExchangeSending, ExchangeSent is not fired
> > > anymore.
> > >
> > > Here is my class :
> > >
> > > public class MyEventNotifier extends EventNotifierSupport {
> > >
> > > private Logger logger = LoggerFactory.getLogger(MyEventNotifier.class);
> > >
> > > public MyEventNotifier() {
> > > setIgnoreCamelContextInitEvents(true);
> > > setIgnoreCamelContextEvents(true);
> > > setIgnoreRouteEvents(true);
> > > setIgnoreExchangeAsyncProcessingStartedEvents(true);
> > > // setIgnoreExchangeSendingEvents(true);
> > > }
> > >
> > > I've looked at the super classes, and I don't understand why Sent and
> > > Sending should be linked...
> > >
> > > Any ideas ? FYI I've tested it with 3.20.0 and 3.20.1, and both fail...
> > >
> > > For now I can ignore ExchangeSending events, but I'd prefer to
> > > understand how it works...
> > >
> > > Thanks for your help.
> > >
> > > Regards.
> > >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
>
--
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel 3.X / Custom event notifier : expected events are not recieved
Posted by Ephemeris Lappis <ep...@gmail.com>.
Hello.
So the best way to get my expected events is with my settings, and
just ignoring "ExchangeSendingEvent", right ?
Could you please confirm that no other event type that I had not
already seen in my tests is linked to the selected ones ?
Thanks for your help.
Regards.
Le lun. 9 janv. 2023 à 18:57, Claus Ibsen <cl...@gmail.com> a écrit :
>
> Its optimized in core for these to be paired
>
> On Mon, Jan 9, 2023 at 6:38 PM Ephemeris Lappis <ep...@gmail.com>
> wrote:
>
> > Hello.
> >
> > Still working on porting old code from Camel 2.X to Camel 3.X, I have
> > a new issue. The EventNotifier in Camel 3.X is slightly refactored,
> > and I can't get the events I expect although my settings seem correct.
> >
> > I'd like to get only event of Type :
> > - ExchangeCreated
> > - ExchangeFailed
> > - ExchangeCompleted
> > - ExchangeSent
> >
> > I understand that for Exchange* events I have to accept ExchangeEvent.
> > But When I try to exclude ExchangeSending, ExchangeSent is not fired
> > anymore.
> >
> > Here is my class :
> >
> > public class MyEventNotifier extends EventNotifierSupport {
> >
> > private Logger logger = LoggerFactory.getLogger(MyEventNotifier.class);
> >
> > public MyEventNotifier() {
> > setIgnoreCamelContextInitEvents(true);
> > setIgnoreCamelContextEvents(true);
> > setIgnoreRouteEvents(true);
> > setIgnoreExchangeAsyncProcessingStartedEvents(true);
> > // setIgnoreExchangeSendingEvents(true);
> > }
> >
> > I've looked at the super classes, and I don't understand why Sent and
> > Sending should be linked...
> >
> > Any ideas ? FYI I've tested it with 3.20.0 and 3.20.1, and both fail...
> >
> > For now I can ignore ExchangeSending events, but I'd prefer to
> > understand how it works...
> >
> > Thanks for your help.
> >
> > Regards.
> >
>
>
> --
> Claus Ibsen
> -----------------
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel 3.X / Custom event notifier : expected events are not recieved
Posted by Claus Ibsen <cl...@gmail.com>.
Its optimized in core for these to be paired
On Mon, Jan 9, 2023 at 6:38 PM Ephemeris Lappis <ep...@gmail.com>
wrote:
> Hello.
>
> Still working on porting old code from Camel 2.X to Camel 3.X, I have
> a new issue. The EventNotifier in Camel 3.X is slightly refactored,
> and I can't get the events I expect although my settings seem correct.
>
> I'd like to get only event of Type :
> - ExchangeCreated
> - ExchangeFailed
> - ExchangeCompleted
> - ExchangeSent
>
> I understand that for Exchange* events I have to accept ExchangeEvent.
> But When I try to exclude ExchangeSending, ExchangeSent is not fired
> anymore.
>
> Here is my class :
>
> public class MyEventNotifier extends EventNotifierSupport {
>
> private Logger logger = LoggerFactory.getLogger(MyEventNotifier.class);
>
> public MyEventNotifier() {
> setIgnoreCamelContextInitEvents(true);
> setIgnoreCamelContextEvents(true);
> setIgnoreRouteEvents(true);
> setIgnoreExchangeAsyncProcessingStartedEvents(true);
> // setIgnoreExchangeSendingEvents(true);
> }
>
> I've looked at the super classes, and I don't understand why Sent and
> Sending should be linked...
>
> Any ideas ? FYI I've tested it with 3.20.0 and 3.20.1, and both fail...
>
> For now I can ignore ExchangeSending events, but I'd prefer to
> understand how it works...
>
> Thanks for your help.
>
> Regards.
>
--
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2