How to override Web service url in http request node in IIB - ibm-integration-bus

I'm trying to override the default RequestURL on an HTTP request node in an IIB request flow but it doesn't work.
I have tried setting the following value in a computation esql node before I call the "request node" but it doesn't work.
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://mytseturl.com/sadf'

Check a Compute Mode property for used compute node. It must consists LocalEnvironment. More about Compute Mode here - Setting the mode

Double Click on the HTTP request node and insert the URL.

Related

why the "loadBalancingPolicy“ must be used when "healthCheckConfig" in grpc

The code file is:
client
and server
Doubtful code:
var serviceConfig = `{
"loadBalancingPolicy": "round_robin",
"healthCheckConfig": {
"serviceName": ""
}
}`
Test steps:
1.Run only one server and one client
2.When using "loadBalancingPolicy": "round_robin", the client can detect the "status=NOT_SERVING" of the server
3.When "loadBalancingPolicy": "round_robin" is deleted, or "pick_first" is used, the "status=NOT_SERVING" of the server cannot be detected on the client side
The health check meaningful when has multiple server addresses. If only has one address, there is no need to check health status. So the load balance policy round_robin is work together with health check.
The round_robin will check health status, so it will send request to READY address one after another.
The pick_first policy not support health check, so it will use first success connectted server. So there will only use specify address for any request.
You can read the document of health check and load balance policy in LB Policies Can Disable Health Checking When Needed.
For debug the client and server, you can add environment variable GRPC_GO_LOG_SEVERITY_LEVEL=info and GRPC_GO_LOG_VERBOSITY_LEVEL=99 for more detail of transport and connection event.
When I read the source code carefully, I understood the internal implementation.
pick_first
It implements "balancer.Builder" and "balancer.Balancer" by itself.
"ResolverState.Addresses" will only create a SubConn, there is an addrConn in SubConn, create ClientTransport with the first addr.
Returns a fixed "balancer.PickResult" each time Pick() is called.
round_robin
Pass in the parameter "HealthCheck: true" and return baseBuilder as Builder through "base.NewBalancerBuilder()".
Each addr of "ResolverState.Addresses" will create a corresponding SubConn.
Each time Pick() is called, change the internal next value, get it from "[]balancer.SubConn", and return a new "balancer.PickResult".

Running node-red flow with a client request

I have a node-red flow. I want to run the flow without clicking any trigger node like inject. I want to run the flow with a client request from the dialogflow bot. Is there anyone who has encountered with this problem?
Node red has http in node. You can create an end point. It listenst from this end point. When a request send to it, it is trigered. You can use it for injecting.
I have solved the problem. It can be helpfull for some people. The solution is like following:
The inject node sends a post request to an end point which is inject/inject node Id. So when I request (POST) to the end point, the flow runs. An example of the request is like following:
http://localhost:1880/inject/585915a7.b4f89c
In your Primary node, Instead of
node.on('input', function (msg) {
......
node.send(msg);
});
on your .js file itself write your logic
RED.nodes.registerType("PrimaryNode", (c)=>{
.....
node.send({"payload": value});
})
This will triggered when node loads, no trigger needed to start your flow.

No user defined transport headers in pulled messages from queue OSB JMS WLS

im facing a problem with my jms messeages.
Case is:
in my mainPS i give an employeeId on request which routes to BS to get employees with emploeeId >= than given. Response is employees collecion.
On response action in mainPS I loop through whole collection and id like to add to JMS queue one by one employee as simple message. In every loop iteration im seting user-defined transport header in if statement as msgName 'even' or 'odd' depends on employeeId on Outbound Request. On loged result i can see that headers have added properly.
Then (still for every employee) I publish my JMS-BS which adds message to queue.
When I want to pull my messages in JMSConsumerPS there are no any transport headers which i have added. Consumer has Get All Headers property set as 'YES'.
Im logging in consumer my whole
$inbound/ctx:transport
and what i get is:
<con:transport>
<con:uri>myURI</con:uri>
<con:mode>request</con:mode>
<con:qualityOfService>best-effort</con:qualityOfService>
<con:request xsi:type="jms:JmsRequestMetaData" xmlns:jms="http://www.bea.com/wli/sb/transports/jms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tran:headers xsi:type="jms:JmsRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
<jms:JMSDeliveryMode>2</jms:JMSDeliveryMode>
<jms:JMSExpiration>0</jms:JMSExpiration>
<jms:JMSMessageID>ID:<834866.1398327222060.0></jms:JMSMessageID>
<jms:JMSPriority>4</jms:JMSPriority>
<jms:JMSRedelivered>false</jms:JMSRedelivered>
<jms:JMSTimestamp>1398327222060</jms:JMSTimestamp>
<jms:JMSXDeliveryCount>1</jms:JMSXDeliveryCount>
</tran:headers>
<tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">UTF-8</tran:encoding>
<jms:message-type>Text</jms:message-type>
</con:request>
Thanks for help.
Just a guess.
I was setting transport header in in-correct place. I had a "publish"
action in the proxy and I was setting transport header just before the
publish action. I moved the "transport header setting" to be done
inside the "publish" action/task . Now it works as expected.
Taken from https://community.oracle.com/thread/2155298?tstart=165, link most likely will be dead soon enough - Oracle community ...
Thank you very much for that. That was almost same issue. What I did was movig "transport header setting" into request action of published BS. Thing is i have tried it before asking but had no idea why it didnt work. Probably the reason could be that i turned on pass all headers through pipeline that time [?]. Had no idea if that can make such a mess. Thanks for replaying.

Save Responses to a file Listerner - Setting file name

I've a JMeter test plan with a number of HTTPRequests. For each HTTPRequest I have added a "Save Responses to a file" Listener when a failure occurs. Ideally I would like the file name to be the same as the label of the Request it is logging it for with a suffix "_FAILURE" added.
Is there any way of using a single "Save Responses to a file" Listener at the top level of my plan and having this be generated automatically rather than having to set manually myself for each?
Any listener has access to SampleResult of sampler that was run last. You can get it using __Beanshell function. SampleResult has method for getting sampler label. So filename prefix of Save Responses to File listener will be:
${__BeanShell(SampleResult.getSampleLabel())}_FAILURE

WebSphere Message Broker: Simple Flow Error

I'm creating a simple MessageBroker flow. It goes MQInput Node -> Compute -> MQOutput Node where all Compute does is:
CALL CopyEntireMessage();
SET OutputRoot.Properties.MessageFormat='XML1';
It should only change the message format from Binary1 to XML1. However, the MQOutput Node fails and sends the message along its Failure connection. I'm unclear as to the reasons a MQOutput node could fail?
You should check the following points:
Check the parsing options of compute node in the flow (properties--advanced)
Specify the Message set name in the esql.
Specify the output queue name (reply to) in the esql.
check input and output queues are present in the MQ
Check if the function you are calling is there in the esql.
It would be easier to help if you can provide me the failure message.

Resources