In TicToc tutorial 13, the message destination is random. How can I specify the destination of the message? say I want it to get to tic[5] arriving from tic[0]. Then create another message with different source and destination e.g. from tic[3] to tic[2].
Also the paths are randomly selected between the nodes in this tutorial, so how can I modify this so the message can get to its destination using shortest path?
One can set any values as source and destination of a message in TicToc13, for example:
TicTocMsg13 *msg = new TicTocMsg13("Test message");
msg->setSource(0);
msg->setDestination(5);
According second part of the question:
TicToc examples were prepared to show and learn how to use OMNeT++ and how to control behavior of model using C++. They do not reflect real systems. Therefore "routing" in TicToc13 is very simple (i.e. random). Choosing shortest path for routing requires more sophisticated routing protocol that has some knowledge about topology. Preparing such protocol for TicToc model could be possible but many additional things will be necessary (i.e. routing table, control messages, a way to configure/share routing information etc.). What is more all these issues have been already resolved for IP protocols.
Related
I am new to AMQP trying to understand the concept so my question might be very naive.
I am sending message to ActiveMQ Broker and while sending the message, I have to mention LinkName but that doesn't matter what I am putting at consumer side and producer side I am receiving the data anyway.
I am confused what is the deal with LinkName?
I can't really state it any better than section 2.6.1 of the AMQP 1.0 specification:
2.6.1 Naming A Link
Links are named so that they can be recovered when communication is interrupted. Link names MUST uniquely identify the link amongst all links of the same direction between the two participating containers. Link names are only used when attaching a link, so they can be arbitrarily long without a significant penalty.
A link’s name uniquely identifies the link from the container of the source to the container of the target node, i.e., if the container of the source node is A, and the container of the target node is B, the link can be globally identified by the (ordered) tuple (A,B,<name>). Consequently, a link can only be active in one connection at a time. If an attempt is made to attach the link subsequently when it is not suspended, then the link can be ’stolen’, i.e., the second attach succeeds and the first attach MUST then be closed with a link error of stolen. This behavior ensures that in the event of a connection failure occurring and being noticed by one party, that re-establishment has the desired effect.
When sending a message, MassTransit wraps that payload with an envelope which has a field called destinationAddress. What purpose does this field have?
I found this because I have a number of C# microservices communicating with some node and java based services - so I've been using the minimum payload defined here:
http://masstransit-project.com/MassTransit/advanced/interoperability.html
I've had no problem integrating the two services together I was just wondering what the point was of having the destinationAddress as part of the message itself? Is it just a belts and braces kind of thing to make sure messages don't go on the wrong queue by mistake?
I would have thought that all of this information can be derived since it is literally just built up of a) the message bus host and b) the queue name used when actually sending the message?
Transports have a variety of ways to delivering messages. For instance, publishing a message to a topic would set the destination address to (URI of topic) but it may be delivered to a queue (via a subscription, forwarded by the transport) with a different address. In this case, the envelope has the original destinationAddress, whereas the queue would have a different address.
There are also cases where messages may be scheduled, redelivered, faulted, etc., and having that information helps in troubleshooting production systems in cases where the original destination may not be known otherwise.
So, yeah, in the simplest case it seems superfluous, however, it comes in useful down the road when trying to figure out why something doesn't work.
I'm trying to send and receive messages to channels/topics whose destination names are in a database, so they can be added/modified/deleted at runtime, but I'm surprised I have found little on the web. I'm using Spring Cloud Streams to allow to change the underlying broker.
To send messages to dynamically bound destinations I'm going with BinderAwareChannelResolver.resolveDestination(target).send(message), but I haven't found something that works like it to receive messages.
My questions are:
1. Is there something similar?
2. how can the message be processed periodically as #StreamListener does?
3. And not as important, but can you create a subscriber automatically in case there is none?
Thanks for any help!
This is a bit out of scope of the original design of the framework. But I would further question your architecture. . . If you truly desire to subscribe to unlimited amount of destinations I wonder why? What is the underlying business requirement?
Keep in mind that even if we were to do it somehow that would require creation of a message listener container dynamically for each new destination which would raise more questions, such as, how long would such container have to live since eventually you would run out of resources.
If, however, you simply asking about possibility of mapping multiple destinations to a single channel so all messages go to the same message handler (e.g., StreamListener), then you can simply use input destination property and define multiple destination delimited by comas.
I want to send the reputation values of nodes to the neighbour nodes in OMNet++ utilizing Veins. I have installed veins4a. I have done the tictoc and run the veins successfully. Can anybody help me on how to send this type of information in Veins. Should i use extra message but UDP/TCP is not supported in the current version of Veins.
Is it possible to send this message using the WaveShortMessage.msg by adding extra information (like extension in this message)?
The best way to start might be to modify the existing example, which uses TraCIDemo11p as its application and WaveShortMessage as the message exchanged between cars. Feel free to add new fields to the message class (just like you did in the Tic Toc tutorial, but now in WaveShortMessage.msg) and to implement new ways of how the application reacts to received messages (again, just like in the Tic Toc tutorial, but now in TraCIDemo11p.cc).
The question environment relates to JavaEE, Spring
I am developing a system which can start and stop arbitrary TCP (or other) listeners for incoming messages. There could be a need to authenticate these messages. These messages need to be parsed and stored in some other entities. These entities model which fields they store.
So for example if I have property1 that can have two text fields FillLevel1 and FillLevel2, I could receive messages on TCP which have both fill levels specified in text as F1=100;F2=90
Later I could add another filed say FillLevel3 when I start receiving messages F1=xx;F2=xx;F3=xx. But this is a conscious decision on the part of system modeler.
My question is what do you think is better to use for parsing and storing the message. ETL (using Pantaho, which is used in other system) where you store the raw message and use task executor to consume them one by one and store the transformed messages as per your rules.
One could use Espr or Drools to do the same thing , storing rules and executing them with timer, but I am not sure how dynamic you could get with making rules (they have to be made by end user in a running system and preferably in most user friendly way, ie no scripts or code, only GUI)
The end user should be capable of changing the parse rules. It is also possible that end user might want to change the archived data as well (for example in the above example if a new value of FillLevel is added, one would like to put a FillLevel=-99 in the previous values to make the data consistent).
Please ask for explanations, I have the feeling that I need to revise this question a bit.
Thanks
Well Esper is a great CEP engine, but drools has it's own implementation Drools Fusion which integrates really well with jBpm. That would be a good choice.