Not much to add to David's response.

A queue on a ruleset is just like the default main queue on the
default ruleset. It means that

1. the to-be-processed messages are grabbed from the queue,
2. run through all actions synchronously
3. after that purged from queue

If one message blocks during phase 2, the following actions also block
(rough approximation, may happen in the commit phase and as such a bit
non-immediately - but that's even hard to observe).

If your actions can actually block individually, you need a queue on
each of them.

Nevertheless: to the original question: if you have a rule set which
has no queue, and all are on the actions, the ruleset is called
synchronously, but the actions are than carried out async. It's always
the same, not matter where the queue is put.

Rainer

El mar, 19 ene 2021 a las 21:25, David Lang (<da...@lang.hm>) escribió:
>
> On Tue, 19 Jan 2021, John Chivian via rsyslog wrote:
>
> > I have tended to put the queues on the enclosed actions rather than on the 
> > rulesets, especially in situations where multiple outbound actions within a 
> > ruleset might block independently of each other, but yes… the queue 
> > (somewhere) is required for it to be asynchronous.  That part is in the 
> > documentation too.
> >
> > Question for Rainer (and David)… If the queue goes on the ruleset, not the 
> > enclosed actions, does each action within the ruleset use the queue 
> > independently, regardless of whether or not it’s also in use for other 
> > actions within the ruleset?  What happens if one action is blocked but 
> > another is not?  And then in corollary, what happens if rsyslog shuts down 
> > and saves the queue while this is happening?  On resumption, is the queued 
> > event fed back through all actions in the ruleset?
>
> I believe that if a batch fails and is retried (with or without shutdown in 
> the
> middle), it will go through all actions in the queue.
>
> the worker thread gets the message batch from the queue and then for each
> message in the batch, works it's way down through all the actions (remember,
> there can be dependencies between actions, setting variables, stop, etc)
>
> If you have multiple outputs that can block independently, then you want
> separate queues, but you may want to think about how independed they really 
> are
> (is there likely to be a common problem, netork, congested server, etc that
> really makes them less independent than they look at first glance)
>
> David Lang
>
> > I think for what I want to do (multiple network output actions within a
> > ruleset) having the queue on those actions (one per destination) is correct,
> > but please correct me if in fact it doesn’t really make any functional
> > difference.
> >
> > I didn’t see such detail in the docs.  Thanks,
> >
> >
> >> On Jan 19, 2021, at 10:28, Rainer Gerhards <rgerha...@hq.adiscon.com> 
> >> wrote:
> >>
> >> YES, BUT ... you need to assign a queue to the called ruleset. Else
> >> it's synchronous.
> >
> > _______________________________________________
> > rsyslog mailing list
> > https://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
> > sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T 
> > LIKE THAT.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to