B2B transaction meta data to database - ibm-datapower

Using soap input we can query b2b metadata .
Sample query:
I want response of above to checked at Datapower regularly and sent to MQ Queue or soap node of broker...
Want to log complete b2b transactions meta data to database once response pass to Mq queue or soap node of broker it is easy to log to database.
But how get the response for every transaction in B2B Transaction viewer..

You'll have to set up Processing Policies for your partners (both Internal and External) where you dump out data.
If you need to add AS2/ebMS MDN's you can grab those in the Response rule (Server to Client).
If you need the final AS2/MDN envelopes you need to proxy the messages through a XML Firewall or MPGW as you won't get the final envelopes otherwise...

Related

Corda 4 - Querying vault by specific transactionid

We are building a POC using Corda 4 and Springboot web server.
We are currently using the following code to retrieve all the states from the vault via RPC -
val vaultStatesAndRefs = services.proxy.vaultQueryBy<State>().states
val vaultStates = vaultStatesAndRefs.map { it.state.data }
We want - to retrieve a state from the vault via RPC using the transactionId.
Kindly guide in achieving this.
Please note that Corda doesn't guarantee the set of transactions retrieved via any method would remain consistent across future versions of Corda. This is because the future version of Corda would use SGX-encrypted format to exchange transaction chain between nodes. Thus the transactions can only be decrypted in a secure SGX enclave.
Having said that there is no direct API exposed which could be used to obtain state based on transactionId via RPC. The one you could use (internalFindVerifiedTransaction) have been deprecated and would likely be removed in the future versions of Corda.
The way to do this I suppose would be to use flow. You could retrieve the output states based on the transactionId.
SignedTransaction tx = getServiceHub().getValidatedTransactions().getTransaction(
SecureHash.parse(txId));
tx.toLedgerTransaction(getServiceHub()).getOutputStates();
You could then trigger the flow from your client using RPC and get the result from the FlowHandle object returned.
FlowHandle<List<ContractState>> flowHandle =
proxy.startFlowDynamic(GetStateFlow.class, txId);
List<ContractState> list = flowHandle.getReturnValue().get();

Transaction Scope in Pub/Sub + Message Label in Rebus

Currently I'm using WCF as service bus. But I want to switch to a more powerful service bus. I Chose Rebus.
I'm somehow new to Rebus. I have some problems :
1) My data is persisted in a DB table. I want publisher to read all persisted data every n seconds and publishes it to subscribers and then set a sent flag to data in DB.
Is there some timing for publishing?
Reading and publishing and changing (setting flag) data must be done in a transaction scope. Is there any defined solution in Rebus?
2) In Consumer, I want to save published data in some table. Reading message from message queue and saving in DB (in my handler) must be done in transaction scope. How Rebus do this?
3) Message label for published messages set to a random unique string. I want to set my custom label for created MSMQ message. is there any solution?
1) You are on your own when it comes to querying database tables at regular intervals – there's no built-in mechanism in Rebus that does this.
I can recommend you take a look at System.Timers.Timer or something similar.
2) You can enable automatic transaction scopes in your Rebus handlers by using the Rebus.TransactionScopes package.
3) Out of the box, it is not possible to specify the label to be used on the MSMQ message. It will be set by Rebus to a string consisting of the message type and ID as indicated by this extension method.

How to delete metrics in opentsdb using http api

How to delete metrics in Opentsdb using HTTP API based on given time period.
http query and metric name
edit /etc/opentsdb/opentsdb.conf file
add below property to enable deletion
tsd.http.query.allow_delete=true
then restart opentsdb.
try below sample query to delete data ,
select http DELETE method in rest client.
http://host:4242/api/query?start=2016/02/16-00:00:00&end=2016/02/17-23:59:59&m=avg:1m-avg:metricname

What is WSM Buffer in Data Power

What is WSM Buffer in IBM DataPower's context?
As per my understanding, WSM Buffer is used to monitor incoming requests in DataPower. The statistics for all incoming requests such as 'completed records', 'pending records' etc are captured in 'WSM Agent Status' in DataPower.
Can you please provide a detailed description of WSM Buffer and how does it help in logging and monitoring?
A WSM buffer is relatively easy to configure setting in datapower XI52. You need to enable it like following:
Use the DataPower Web Interface
Navigate to Object > Device Management
Enable data retention in the WSM buffer
Select XML Management Interface
Check the WS-Management Endpoint checkbox
Click Apply
Choose to retain data when data collection is stopped
Select Web Services Management Agent
Select Buffering Mode = Buffer
Click Apply
Then you need to use products like ITCAM for SOA which have capability to read WSM buffer and make sense out of it. You need to configure ITCAM for SOA for it. Once done you can test your WSM buffer configuration like below:
Send four requests to your DataPower device
Check the WSM buffer
1.Choose Status > Web Service > WSM Agent Status
2. Status is 4 (for example) records seen, 4 (for example) complete records
Parameters have following meaning
a.) Records seen: total lost + complete
b.) Records lost: discarded when the buffer was full
c.) Complete records: ready for data collection
d.) Pending records: requests awaiting a server response
See if it helps you !

Get a value which is being inserted in DB via an HTTP request and later being used in another transaction

JMeter Version: 2.9
Test Scenario:
To test purchase order creation process.
In the process, an HTTP request generates a temp id for the purchase being made and stores it into the DB. Later this tempid gets fethced from the DB and used in the purchase closure step.
Could anyone suggest how to get this temp id value from the DB and reuse the same later in the JMeter test plan in the purchase closure step.
If the value is stored in the DB only and doesn't appear anywhere in DOM (page source) the only way to get it is using JDBC Sampler (or JDBC Post Processor wrapped in Transaction Controller if you don't want extra sampler in your results and extra time being tracked to HTTP Request).
You'll need to know database URL, credentials, etc. and have a proper JDBC driver somewhere in JMeter classpath - download the JDBC driver for your database and drop it to /lib folder of your JMeter installation.

Resources