[reactive-messaging] Disable channel

160 views
Skip to first unread message

Željko Trogrlić

unread,
Aug 4, 2020, 9:29:48 AM8/4/20
to SmallRye
Is it possible to disable the incoming channel, e.g. due to license restriction?

clement escoffier

unread,
Aug 4, 2020, 10:55:54 AM8/4/20
to SmallRye
Hello,

Interesting question.
The connectors do not have an enabled/disabled attribute. That could be a nice addition.

For the time being, just an idea not sure how practicable it is, maybe it's possible to remove the value from MP Config?

Clement

Le mar. 4 août 2020 à 15:29, Željko Trogrlić <zeljko....@gmail.com> a écrit :
Is it possible to disable the incoming channel, e.g. due to license restriction?

--
You received this message because you are subscribed to the Google Groups "SmallRye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smallrye+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smallrye/5863afa6-0cd3-4629-aa3b-6be4200ebd0cn%40googlegroups.com.

Željko Trogrlić

unread,
Aug 6, 2020, 2:45:18 AM8/6/20
to SmallRye
I do not want to disable the whole connector, just the single channel. I am using a method with the  @Incoming annotation. I was thinking about disabling the whole bean with the CDI extension, but that is not possible under Quarkus. My current idea is to use the channel with a conditional subscription. Of course, some way to disable the annotated method would be a nicer solution.

clement escoffier

unread,
Aug 6, 2020, 3:57:11 AM8/6/20
to SmallRye
Yes, you can't use an extension like this in Quarkus, but you can use an extension doing the same. You will find some code vetoing beans in the Quarkus codebase (in the reactive messaging extension we veto the metrics bean if metrics are disabled).

The attribute I was mentioning would be on the channel level, not attribute level. It would not be on the method but on the channel. Note that it would force you to disable the strict mode (disabled by default so just in case you enabled it) as your method would not be connected to a channel.

Clement

Željko Trogrlić

unread,
Aug 7, 2020, 4:13:02 AM8/7/20
to SmallRye
I found another interesting issue: bean with the @Inject @Channer Multi / Producer will not be initialized and attached to topic unless it is also @Startup. It probably should or at least @Startup should be documented.

clement escoffier

unread,
Aug 17, 2020, 2:59:43 AM8/17/20
to SmallRye
What do you mean by not initialized? Not injected? That would be a bug.
However, nothing is going to happen until someone subscribe to the channel.

Clement


Reply all
Reply to author
Forward
0 new messages