Save window data - WSO2 CEP - window

I am using unique windows. I want to save the window state or data. because when CEP restart window data will be lost. Is there any way to do this?

Do a persistence or HA mode deployment
https://docs.wso2.com/display/CLUSTER44x/Clustering+CEP+4.0.0#ClusteringCEP4.0.0-Persistencemodedeployment

Related

KStream disable local state strore

I am using Kafka Stream with Spring cloud Stream. Our application is stateful as it does some aggregation. When I run the app, I see the below ERROR message on the console.
I am running this app in a Remote Desktop Windows machine.
Failed to change permissions for the directory C:\Users\andy\project\tmp
Failed to change permissions for the directory C:\Users\andy\project\tmp\my-local-local
But when the same code is deployed in a Linux box, I don't see the error. So I assume it an access issue.
As per our company policy, we do not have access to the change a folder's permission and hence chmod 777 did not work as well.
My question is, is there a way to disable creating the state store locally and instead use the Kafka change log topic to maintain the state. I understand this is not ideal, but it only for my local development. TIA.
You could try to use in-memory state stores instead of the default persistent state stores.
You can do that by providing a state store supplier for in-memory state stores to your stateful operations:
StateStoreSupplier storeSupplier = Stores.inMemoryKeyValueStore("in-mem");
StreamsBuilder builder = stream("input-topic")
.groupByKey()
.count(Materialized.as(storeSupplier))
From Apache Kafka 3.2 onwards, you can set the store type in the stateful operation without the need for a state store supplier:
StreamsBuilder builder = stream("input-topic")
.groupByKey()
.count(Materialized.withStoreType(StoreType.IN_MEMORY))
Or you can set the state store type globally with:
props.put(StreamsConfig.DEFAULT_DSL_STORE_CONFIG, StreamsConfig.IN_MEMORY);

Websphere creating dump only on server start up

Whenever I start the websphere from my IBM Rational Application developer, it is creating dump inside
profiles\AppSrv1
and
C:\Server\profiles\AppSrv1\bin\
and then I have to stop the process under task manager, delete dump files.
Please make a note that I've not logged into the application, only the server start up is creating heap dump
Why is it happening? Any ideas will be helpful for me.
It seems that the automated heap dump is enabled. Check that the checkbox value of Enable automatic heap dump collection under Servers -> Performance -> Runtime in the console.

talend - specify jndi as datasource

I have a talend job that uses tOracleInput component with connection type of ORACLE CUSTOM. It is working well.
Now, I have a requirement to use jndi as the database connection. Any ideas how can this be achieved?
First deploy your job as a webservice. After that you should be able to alter the Use or register a shared DB Connection in tOracleConnection. There you can define your JNDI datasource.
Source: https://www.talendforge.org/forum/viewtopic.php?pid=50374#p50374
The answer that I went with is creating my own custom talend component. Because deploying the talend job as a separate package than the actual web application is kind of, let's say, not an ideal solution in our case.
I have copied the tOracleInput component, and using Talend's component designer, I have added a "Use JNDI" checkbox and "JNDI name" textbox on the component. And modified the javajet files to build the connection from JNDI (InitialContext) using the JNDI name if the checkbox is checked. Else, proceed as usual on tOracleInput codes.
So, whenever I exported my talend job, I would tick the "Use JNDI" checkbox but if I'm just testing within Talend Studio, I would uncheck it and filled up the database properties will be used.
Hope this helps future readers.
Thanks!
**https://intodata.eu/tag/talend/
I have used the 3 part tutorials (on link above) on how to a build custom component to helped me start

How I can keep and restore JMSservers to their last known state after a reboot

I am trying to find if there is any parameter which will keep the Consumption Parameters as the previous workable state after a full restart of Weblogic Server.
I would like to restore JMSservers to their last known state after a reboot-restart.
I have tested and i have enabled the ConsumptionPaused to true in a JMSServer via wlst and I have done a full restart but after the restarting the ConsumptionPaused has changed to false.
Please for your help.
I think you can achieve this using the setConsumptionPausedAtStartup method on the JMSServerMBean mbean
Finally, I have found that with the parameter ConsumptionPausedAtStartup enabled, after the restart of Weblogic then all the osb resources under the destination of JMSServer will have the ConsumptionPaused as true in JMS Queue layer level and not in JMS Server layer.
If you will not disabled the parameter ConsumptionPausedAtStartup, then every time you will restart the server then all the queues under this JMSServer will be with ConsumptionPaused as true.
Best Regards,
Nickname

Websphere Message broker multi-instance message flow

I am looking for a command to change the message broker message flow instance in the run time. I know it is quite easy with MB explorer. But I am more interested towards the server side mqsi command. Ours is a AIX env with message broker 8 installed.
The number of instances a message flow has on the execution group is configured in the BAR file, before deployment.
If you want to change the number of additional instances you will need to redeploy your flow.
You can use the mqsiapplybaroverride command to change the configuration of the flow in the BAR file, and the mqsideploy command to redeploy the BAR.
As of IIB v9 you can control the number of instances dynamically at runtime by assigning a workload management policy.
See the description here:
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bn34262_.htm
Once you have assigned a policy you can change it using the mqsichangepolicy command specifying an xml policy document that has a different number of instances.
Alternatively you can use the web ui to change it directly on the running broker.

Resources