Filtering is not working on C API - solace

Solace filtering is not working , able to publish but not able to consume. the selector just ignore my messages while posting. please give me the solution for that.

When a Solace selector is used, a consuming client only receives a message if the selector evaluates to true when the message’s header field and property values are substituted for their corresponding identifiers in the selector. The Solace message broker filters out messages that do not match.
Solace selectors can only be set for consumers or browsers that are bound to a queue or a durable topic endpoint.
To publish a message that will match a selector, the selector string must be contained in the user property map, or in a specific message header field. The Destination property on a message defines where the message is published to. This will be either a topic or a queue. It cannot be used to match a selector.
For a list of message headers that can be used to match a selector, and its corresponding selector identifier string, please see the Solace Messaging API documentation page here: https://docs.solace.com/Solace-PubSub-Messaging-APIs/Developer-Guide/Using-Selectors.htm
If your consumer is not receiving the message while using a selector, please ensure that the selector string matches what is contained in the header property or user property map of the message.

Related

why DolphinDB reports error message when subscribing to stream tables

I subscribed to stream tables in DolphinDB, but the error reports ‘exception=Only a table can append to another table’. Is there anything wrong with my code?
I also used a user-defined function as the handler. Still, the error message ‘exception=FROM clause must return a table’ shows up.
When subscribing to the stream table, you need to specify the parameter ‘msgAsTable=true’.
subscribeTable(tableName="trades1", actionName="tradesStats22", offset=0, handler=func, msgAsTable=true)
Its default value is false, meaning the subscribed data is ingested into handler as a tuple of columns. That's the cause for the two errors.

Microsoft GraphMail Message - how do I tell if it is sent or received?

I'm using Graph notifications to get Inbox and Sent items.
From the mail ID I fetch the messessage of type ...
https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0
... but how can I tell if it is sent or received? Both createdDateTime and receivedDateTime has values.
There are a couple of ways you could do it, if you use the parentFolderId of the Item and just get the Folder in question is the simplest. Another method that wouldn't require any extra calls is use the PidTagSentMailEntryId extended property https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagsentmailentryid-canonical-property on the message . This will only be set on a Message that is sent and save to the store eg
https://graph.microsoft.com/v1.0/users('user#domain')/messages('AAM...')/?$select=ReceivedDateTime,Sender,Subject,IsRead,parentFolderId,&$expand=SingleValueExtendedProperties($filter=(Id%20eq%20'Binary%200x0E0A'))
if the extended property is returned then you know its a SentItem if no property is returned then its received.
received emails have the property internetmessageheader
while sent emails don't
For instance you can ask it with the following GET Graph request :
https://graph.microsoft.com/v1.0/me/messages?$select=internetMessageHeaders
It will retrieve a JSon array representing a colection of emails :
an email with a non empty internetmessageheader property is a received email
an email with a missing internetmessageheader property is a sent item
I think this this is the most reliable way because those headers are added by email servers while emails are sent.
(you can base your choice on other inputs like the parent mailfolder but anyone can move an email to another mailfolder)

Spring AMQP custom message correlation using an identifier generated by the app

Spring AMQP custom message correlation using an identifier generated by the app for the outbound gateway using spring integration.
We have a requirement where we need to correlate messages for outbound gateway with an id generated by app, in which actual processing of the messages would happen in external system and the response for the request will come as post from the external system, so we cannot rely on amqp_correlation data.
If you provide the steps for this that will be great.
Solution Tried
Set the correlation key in the rabbit template
Create Message of type AMQP, set the header name with the correleation key set in the template with some generated value
Provide header-mapper in the AMQP outbound gateway for the custom header name
Result
Rabbit template was able to map with the custom header, However it generates its own value, Not using the value that was set in the request/reply messages
Please open a new feature JIRA Issue for this.
Bear in mind it will be your responsibility to ensure the correlationId is unique.
You might be able to work around it by subclassing the template and overriding sendToRabbit; and set up the correlationId there; you would have to save off the template's correlationId (ideally in the message in a different header, but perhaps in a Map) and have the server return that header too.
protected void sendToRabbit(Channel channel, String exchange, String routingKey, boolean mandatory,
Message message) throws IOException {
// fix up properties
super.doSend(...);
}
You would also have to override onMessage() to restore the proper correlationId for the inbound request.

Sending message with CAPL and dbc signal values

I am using CAPL to simulate a test envirmonet for some small tests and i am having problems sending messages or more specific setting up the values.
I am able to read Signal Values with $SignalName, also i am able to set signal values like that.
If i am using this code to send a message the message data is always 0:
on key 't'
{
message MessageName msg;
setSignal(SignalName,i);
write("Value: %d",i);
outport(msg);
}
Witch makes kinda sence becouse i think the message objects are intended to be used to send bytes witch you can access through msg.byte()
I know that i can set signals in messages by msg.SignalName, but again this seems not the right way. I think there should be a way to send a message and all the signals contained in the message are set to the values set by SetSignal() function. Otherwise the SetSignal Funktion is a bit useless
Maybe somebody has an idea.
Thank you
I am using CANalyzer version 8.2 and I do not have the option to use SetSignal(signal, value) function. Setting the signal values by accessing the message selectors seems to be a reasonable approach. However you used the function outport! You need to use the output function to transmit messages.
on key 't' {
message MessageName msg;
msg.signal1 = value1;
output(msg);
}
For this method the database has to be configured so that the message msg contains all the necessary signals (signal1).
If you want to set all signal values to the start values configured in the database use the function:
setSignalStartValues(message msg);
You can set up an interaction layer that will handle the messages as defined in the CAN database (DBC file) assigned to the node. The interaction layer will need some attributes in the database to define how the messages have to be sent. If not already present you may have to add these attributes. If the Tx messages are not sent as expected, check the attributes.
Function output() is useful if you want to implement (and fully control) the sending of the message yourself.
Instead of using SetSignal() it is also possible to write the signal using $SignalName = value;
See this support note:
https://kb.vector.com/upload_551/file/SN-IND-1-011_InteractionLayer(1).pdf
You may have to guess and experiment a bit. In the DBC files provided by a customer I found attribute values that are not mentioned in this document.

Mirth: dynamically determine which SOAP method to call

Consider a Mirth channel with a Destination of a SOAP Sender. The WSDL is successfully loaded and has more than one method available. Each method would take a different number of arguments. Example methods:
AddPerson()
UpdatePerson()
DeletePerson()
MergePerson()
UnmergePerson()
Given the set of HL7 message event types, i.e.
A28 = Add Person
A31 = Update Person
A29 = Delete Person
etc
Question: How would you setup a Destination in Mirth to have the variable's value determine which SOAP Method is called?
It doesn't necessarily have to be a SOAP Sender. Could be any type.
Im not sure you can dynamically select the method on the fly, but you could setup a destination per MessageType and use filters to ensure that a message is routed to the correct destination (method).
I will look into the dynamic select. Perhaps the method is available via a javascript transformer object.

Resources