After processing a message I need to set the Accounting Token on the msg. How do I set it in the outbound message. I have tried the following and it does not work
msg.setObjectProperty(JmsConstants.JMS_IBM_MQMD_ACCOUNTINGTOKEN,value)
where value set is a byte[]. But when I observe the message the AccountingToken is not getting set.
Is there something I am missing over here?
After further analysis I found that the reason why it was not getting set was because the following property was not set.
((JmsDestination) dest).setBooleanProperty(WMQConstants.WMQ_MQMD_WRITE_ENABLED, true);
After setting the above value the accounting token was available.
From IBM Knowledge Center:
For certain properties, you must also set the WMQ_MQMD_MESSAGE_CONTEXT
property on the Destination object. (...)
The following properties require WMQ_MQMD_MESSAGE_CONTEXT to be set to
WMQ_MDCTX_SET_IDENTITY_CONTEXT or WMQ_MDCTX_SET_ALL_CONTEXT:
JMS_IBM_MQMD_UserIdentifier
JMS_IBM_MQMD_AccountingToken
JMS_IBM_MQMD_ApplIdentityData
Related
There is a Java SpringBoot application, with an application.yaml file where all the properties are configured. some of the fields are configured to read from the deployment.yaml file st eince we use different environments, and the values for these fields changes. However I wan't to define a field which will consider the value from deployment.yaml file if it is present, else it should take the default value given.
Something like this:
root:
some-sub-level:
some-key: ${VALUE_FROM_DEPLOYMENT_YAML:${default.level.value}}
default:
level:
value: some-default-value
I tried several ways and couldn't succeed. It takes blank value since VALUE_FROM_DEPLOYMENT_YAML will be null in one particular environment.
PS: I'm aware of adding default value in Java code like with #Value("${value.from.application.yaml:"some default value"}, but I'm not interested in this. The requirement is not to read this in Java code but it will be a configuration for Azure Application Insight.
Could anyone help me what I'm missing here
According to this answer, it supports this notation which is called Placeholder property:
spring:
profiles:
active: ${APP_PROFILE:test}
# ... #
If I understand correctly, I should be able to use an opentelemetry Resource to attach custom Attributes to outgoing Spans. I think the syntax should be something like
Resource resource = Resource.create(Attributes.builder().put("key", "value").build());
SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder().setResource(resource).build;
Questions:
How do I set that TracerProvider as the default provider for my application?
If I do so, will it add that attribute to the default set of attributes attached to Spans, or will it replace them?
Also, if I do so, would I still be able to use the Span.current() syntax to access the current Span, or would I need to access the current Span through the Tracer?
I am trying to update UCLASS field value using "BAPI_USER_CHANGE" through JCO, but getting below error:
com.sap.conn.jco.JCoRuntimeException: Field UCLASS is not a member of BAPIUCLASS
Here is my code to set the value:
JCoStructure license = params.getStructure("UCLASS");
license.setValue("UCLASS", changes.get(0).getCurrent());
JCoStructure licenseX = params.getStructure("UCLASSX");
licenseX.setValue("UCLASS", 'X');
Can you please tell me this comes under which Structure? tried also with "LOGONDATA" and "ADDRESS".
Logon with a SAP GUI and use transaction SE37 to display the parameters and structures of the RFM BAPI_USER_CHANGE.
The ABAP workbench offers forward navigation. So if you would like to see how this UCLASS structure looks like, go to the Import tab of the RFM BAPI_USER_CHANGE and double-click on the Associated Type BAPIUCLASS.
You are correctly getting the error message because there is no field with name UCLASS in the RFM parameter UCLASS (which is a JCoStructure).
Instead of this, license.setValue("LIC_TYPE", "XY"); would be valid here, for example.
If you want to set another structure as a whole, you would have to use
params.setValue("UCLASS", myJCoStructure);.
I am currently taking a course in app development and I am trying to use Facebooks API for GET requests on certain events. My goal is the get a JSON file containing all comments made on a certain event.
However some events return only a an "id" key with an id number such as this:
{
"id": "116445769058883"
}
That happends with this event:
https://www.facebook.com/events/116445769058883/
However other events such as (https://www.facebook.com/events/1964003870536124/) : returns only the latest comment for some reason.
I am experementing with facebook explore API:
https://developers.facebook.com/tools/explorer/
This is the following GET requests that I have been using in the explorer:
GET -> /v.10/facebook-id/?fields=comments
Any ideas? It's really tricky to understand the response since both events have the privacy set to OPEN.
Starting from v2.4 of the API, the API is now declarative which means you'll need to specify what fields you want the API to return.
For example, if you want first name and second name of the user, then you make a GET request to /me?fields=first_name,last_name else you will only get back the default fields which are id and name.
If you want to see what fields are available for a given endpoint, use metadata field. e.g. GET /me?metadata=true
I want to persist a fix4.2 message to database by retrieving the value of each tag. I am having the ExecutionReport object of the fix message.
I am retrieving the tag value of account using exec.getString(1) and this tag value is not present in the message so it is throwing FieldNotFound exception.
In Fiximate I found that account is not a mandatory field.
I also tried with exec.getAccount().getValue() but got same exception.
I found that every all these method throws FieldNotFound exception.
Is there any way to retrieve the tag value as null if that non-mandatory field is not present in the fix message.
Any help will be highly appreciated.
Thanks in advance.
Regards,
Shadab
You didn't say which QuickFIX port you are using (e.g. the original QF for C++, QF/J for Java, QF/n for C#).
If a field is not required, you simply need to test for its presence first.
C++: exec.isSetField(1) or exec.isSetField(field)
(there might also be a exec.isSetAccount(), not sure)
Java: exec.isSetField(1) or exec.isSetAccount() or exec.isSetField(field)
C#: exec.IsSet(1) or exec.IsSetAccount() or exec.IsSetField(field)