[SNMP4J] multithreaded ordered receiver

none none 1475369n at gmail.com
Thu May 7 17:47:55 CEST 2009


Thank you Jason,

The solution you mention is what I have implemented until now, but as you
said it can be inadequate if thread count matters.

Unfortunately the system have hundreds of senders, and that means hundreds
of threads, so that is the reason I'm searching for an alternative.

Currently working on a design to address this, but wanted to know if SNMP4J
already have some mechanism for this kind of situation.





On Thu, May 7, 2009 at 5:15 AM, Jason Jeffords
<jason.jeffords at comcast.net>wrote:

> When a trap is received, read it immediately and place it in a
> thread safe queue for that sender (i.e. have 1 queue per sender).
>
> Then, have one worker thread per sender queue (if you are not
> worried about thread counts) that blocks waiting on queue insertions.
>
> This will allow you to have multi-threaded and ordered processing of
> traps from each sender.
>
> Jason
>
> On Wed, 2009-05-06 at 11:15 -0500, none none wrote:
> > Hello,
> >
> > I need to create an application that receive and process SNMP v1 traps
> from
> > multiple senders.
> >
> > As there are multiple senders, it seems convenient to use multiple
> threads
> > (maybe a thread pool?) to process the traps.
> >
> > But the hard part is:
> > For each sender, the application must process the traps strictly in the
> > order they were received.
> >
> > For example, if the application receives the traps  A, B, C, D  from a
> > particular sender, then the application must process first A, then B,
> then C
> > and finally D.
> >
> > It would be great if someone can give any suggestions to do that?
> >
> > Thank you
> > _______________________________________________
> > SNMP4J mailing list
> > SNMP4J at agentpp.org
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>



More information about the SNMP4J mailing list