Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Publish/Subscribe method

I have attached a mockup (with some bugs it takes a bit just to throw something together to give you all an idea of the probelm I'm facing).    I have pb/sub network that I am trying to create with a data layer that handles distributing the data to multiple subscribers.  I'm trying to have the subscribers send both sub and unsub messages.  I am currently facing 2 problems: 1.  I see the array of subscribers in the subscribe subroutine, but they are not showing up in the publish routine.  Why is that?     2.  I did a quick patch around to force it to work, but when I delete a subscriber queue from the subscriber array *all remaining* subscriber queues freeze as though they are waiting for the missing queue to be enqueued.  Am I removing the subscribers incorrectly?

0 Kudos
Message 1 of 2
(3,281 Views)

Okay, 

I went through an example I found with a Pub/Sub network to compare the differences.  It seems that if you are using a publisher you shouldn't run the actor core of the data distribution. Ive attached the solution.  My only concern about doing it this way is how do I know that I haven't lost any data points?  (say the publish routine takes longer to process than the write data routine - I was using a queue to buffer data and make sure I didn't have any lost datapoints).

0 Kudos
Message 2 of 2
(2,981 Views)