I am using Red Hat's AMQ 6 on OpenShift and consuming messages via Red Hat's EAP. I'm using the AMQ JCA resource adapter 5.11.1.
I want to set jms.nonBlockingRedelivery=true.
I can't find this in any of the following docs:
Connection Configuration URI
Resource Adapter Properties
Activation Spec Properties
Can this be set via a URL query parameter?
When I set a wrong value like:
<config-property name="ServerUrl">tcp://localhost:61616?...&jms.nonBlockingRedelivery=WWWWWWW1
The log says:
org.apache.activemq.ra.ActiveMQEndpointWorker: Successfully established connection to broker...&jms.nonBlockingRedelivery=WWWWWWW1]
I would have expected a complaint e.g. "no boolean," "can't parse," etc.
Setting nonBlockingRedelivery via URL query parameter is supported. You can do so using the jms. prefix, e.g. jms.nonBlockingRedelivery=true.
The reason you don't see any exception is because the OpenWire JMS client ultimately uses Boolean.valueOf(String) to evaluate WWWWWWW1 which simply returns false.
I added this to the documentation.
Related
I use AMQ 6 (ActiveMQ) on OpenShift, and I use a queue with re-delivery with exponentialBackoff (set in connection query params).
When I have one consumer and two messages and the first message gets processed by my single consumer and does NOT get an ACK...
Will the broker deliver the 2nd message to the single consumer?
Or will the broker wait for the re-delivery to preserve message order.
This documentation states:
...Typically a consumer handles redelivery so that it can maintain message order while a message appears as inflight on the broker. ...
I don't want to have my consumer wait for re-delivery. It should consume other messages. Can I do this without multiple consumers? If so, how?
Note: In my connection query params I don't have the ActiveMQ exclusive consumer set.
I have read the Connection Configuration URI docs, but jms.nonBlockingRedelivery isn't mentioned there.
Can the resource adapter use it by query param?
If you set jms.nonBlockingRedelivery=true on your client's connection URL then messages will be delivered to your consumer while others are in the process of redelivery. This is false by default.
I am trying to connect my Soffid 3 server with our custom web application named Schrift. I am using а JSON REST Web Services Connector for this purpose. I added REST Web service plugin and then configured an agent with JSON/XML/SOAP Rest webservice type.
Loading of objects is working fine. My REST connector connects to the web service successfully and gets data of the accounts.
The problem is when I am trying to update some data (for example, I am trying to lock an account), nothing happens. And unfortunately I don't know what should be happening. When should REST connector send updated data to the managed system and in which way? I didn't find any log entries saying that REST connector was trying to update an object on managed system. Maybe I did smth wrong or missed something.
I would appreciate for any help. I can post any conf or log details if you need.
Update#1
(I did some investigation after the first answer)
I checked the agent settings: Read only and Manual account creation are set to no
The account was set to unmanaged type, but I succeeded in changing its type to shared and then to single without getting an error. Now it is set to single
The task queue is empty.
Also I've checked that update method is present and update properties are set correctly. updateParams is not set (it means that all attributes should be sent to the managed system).
But when I change status of the account (from Enable to Disable), nothing happens.
In the console log I can see only these lines
14-Sep-2021 13:26:29.708 INFO [BPM-Scheduler:192.168.7.121:1] com.soffid.iam.bpm.job.JobExecutorThread.run No job to execute
When I manually run the task Analize impact for changes on Schrift, Execution log shows
Changes detected for accounts
=============================
NO CHANGE DETECTED
Changes detected for roles
=============================
NO CHANGE DETECTED
Update#2
After many attempts I made some progress. Now when I make some changes in the account, the task named UpdateAccount baklykov#irf.com.ua#Schrift appears, but runs with an error.
At first it was 415 Unsupported Media Type error as I wrote in comments, but now it looks a little different
Throws exception updating object : Extensible object [type = account]
EmployeeEmail: baklykov#irf.com.ua
IsLockedOut: true (log truncated) ...
caused by Unexpected response, Content-Type: null
Update#3
I found out that soffid's request for updating the object was in improper format (all the parameters were passed in the html request instead of putting them in json body)
After researching I found a method's property called Encoding and set it to application/json value.
Now the parameters are passed in json body (that's what I need), but now the problem is that soffid puts all the parameters in json body, including the key parameter by which the object for updating should be determined. My guess this is the reason why the object in the target system is still not updated.
In other words my application expects a request like this:
https://myapp.mysite.com/api/v1/Soffid/Employees?EmployeeEmail=baklykov%40irf.com.ua :
{"EmployeeLastName":"Baklykov","EmployeeFirstName":"Ivan"}
but Soffid sends this:
https://myapp.mysite.com/api/v1/Soffid/Employees:
{"EmployeeLastName":"Baklykov","EmployeeFirstName":"Ivan","EmployeeEmail":"baklykov#irf.com.ua"}
The system should have created a UpdateAccount task in the task queue. Please, verify:
The task engine is in automatic mode. In read-only or manual mode, no task will be created.
If you are updating an account, check the account is not set as unmanaged. In that case, no tasks is created.
Finally, verify the task queue has not held the task up.
Have you checked the engine mode? Look at Main Menu > Administration > Configure Soffid > Integration engine > Smart engine settings
It should be set to automatic.
I am using websphere application server 9.0.0.6.
I have configured a cics Ressource Adapter and the connection factory for that, to connect my cics.
For that connection I am using the cicseci-9.0.0.2.rar driver.
I can connect my CICS but I get an Abend Code:
com.ibm.connector2.cics.CICSTxnAbendException: CTG9638E Transaction Abend occurred in CICS. Abend Code=: AZI6, error code: AZI6
at com.ibm.connector2.cics.ECIManagedConnection.checkReturnCode(ECIManagedConnection.java:1643)
at com.ibm.connector2.cics.ECIManagedConnection.call(ECIManagedConnection.java:1442)
at com.ibm.connector2.cics.ECIConnection.call(ECIConnection.java:122)
at com.ibm.connector2.cics.ECIInteraction.execute(ECIInteraction.java:264)
at at.grz.jp.cics.Interaction.executeSequence(Interaction.java:179)
Due to the reason, that I use transaction mode ECI_EXTENDED instead of ECI_NO_EXTEND.
So I am trying to find a possibility to configure that parameter. On websphere I can't find a custom property that could be fit.
Is it possible to control this by my application?
Any suggestions for me?
The transactional controls for requests made over the ECI resources adapter are controlled by the TransactionAttribute of the method containing the ECI call.
By default methods are called with a TransactionAttributeType of REQUIRED which means a new transaction will be started if it doesn’t already exist and this causes the ECI request to be sent with ECI_EXTENDED.
If you set the TransactionAttributeType to NEVER then there will be no transaction when the ECI call is made and the request will be sent with ECI_NO_EXTEND.
I have setup the jaas config for kafka using sasl.jaas.config property. I want to update this config and add users dynamically.
As per this doc - http://kafka.apache.org/11/documentation.html#dynamicbrokerconfigs, we can do that by using bin/kafka-configs.sh.
The above doc has config column, which says as follow -
I have tried updating sasl.jaas.config with below command:
bin/kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-name 59 --alter --add-config sasl.jaas.config="KafkaServer {\n org.apache.kafka.common.security.plain.PlainLoginModule required\n username=\"myuser\"\n password=\"mypassword\";\n};\nClient {\n org.apache.zookeeper.server.auth.DigestLoginModule required\n username=\"myuser2\"\n password=\"mypassword2\";\n};"
But it gives me following error:
requirement failed: Invalid entity config: all configs to be added must be in the format "key=val"
If I look to above column, it says the format for value of sasl.jaas.config property is (=)*. What does this means?
How the value for 'sasl.jaas.config' should be passed to update jaas config dynamically?
While it's possible to dynamically update sasl.jaas.config to add more users, the default Plain login module is not intended to be used in production.
Instead you should define callback handlers to handle authentication of users. This is described in the Kafka Sasl Plain docs.
Another option that requires more work (but give even more flexibility) is to create your own login module. The process is described in Can Kafka be provided with custom LoginModule to support LDAP?
Regarding the error message you get, this seems to be an issue with the kafka-config.sh tool. It's not expecting the config value to contain =. You should be able to update that config using the AdminClient API.
I couldn't find an existing issue in JIRA so created a new one: https://issues.apache.org/jira/browse/KAFKA-8010
I'm currently trying to make a connection to the Neurosky Mindwave sensor using a websocket in HTML5. The Mindwave makes use of the Thinkgear Connector which I in turn use to connect to. I connect to the Thinkgear Connector using the default host address 127.0.0.1 with port 13854.
Basically all I do is this:
var socket = new WebSocket('ws://127.0.0.1:13854');
If I run the script the Thinkgear Connector indicates there's a connection, except the .onopen event is never fired. If I check the readyState I get a value of 0, indicating the connection has not yet been established. I think it's because in order to get one I have to send an authorization request first, which will be in the form of the appName & appKey, for example this:
{"appName":"Brainwave Test","appKey":"0139ccebc1902e0905b11bebc63c82eecada5784"}
The problem though is how to send an authorization request? Anyone have any ideas how to do this?
If you're not wedded to the idea of using the ThinkGear Connector driver, you can connect directly to the Bluetooth headset using the (Java) mindwave-bluetooth library, register a listener for each event type, and push a WebSocket message out for each event. That's not quite what you're asking for, but it's an option in lieu of a full WebSocket-to-ThinkGear Connector solution.