> make two publishers <
http://pastebin.com/8j10kKSH> (I base on your publish
> subscribe example) that are publishing different data on the same ip:port.
> Then I will have different consumers, on different places, which will
> consume these data obviusly searching for "Match_Event" and
> "Luxe_Fotogram_Frame" in its own agent (client side).
This is perfectly possible, but you did not show the complete program,
just a body for a single package. How are all these procedures called?
Note that you do not need to Add_Listener twice - on the contrary, you
should *not* do it. Adding a listener twice for the same ip:port is
pointless and will cause errors.
Try to split the logic of your program in the following way:
1. make agent and add a single listener to it
2. register two value publishers
3. loop: publish data when it is ready
It is OK to make agent at the package level, but normally you will
rather want to do it inside some outer subprogram (in simple
subprograms this can be the main procedure), as the configuration
options for the agent are frequently obtained at run-time (during the
program initialization phase), not at elaboration time.
> Maybe I should use one Agent for each publisher and I need also one ip:port
> for each.
No, this will not work either. The reason is that a single ip:port
combination can be used only once (for listening) in the whole system.
You cannot use it twice in the same agent or in two separate agents in
the same program or even in two separate programs.
Regards,