Does anyone know how to connect RabbitMQ with COBOL? - rabbitmq

Does anyone know how to connect RabbitMQ with COBOL? I tried the documentation in RabbitMQ site but the examples make calls to programs like "RMQ_CONNECT" that don't exists.

From the looks of it, RMQ_CONNECT is not a program, but an entry point in a library. Try using Call "RMQ_CONNECT" and make sure the rabbitMQ library is properly linked for your environment.

Write a c or c# helper exe that takes the payload on the command line and sends it to rabbit, then execute it with a "Call SYSTEM using command-line"
like this:
insert-mongodb-record.
move spaces to command
string "mongo --quiet --eval 'db.norple.insertOne({_id: """my-id""", age: """my-age""", initial:"""my-initial""","
"description:"""trim(my-description)""", nimbus:"""my-nimbus"""})' cobol"
into command
display command
call "SYSTEM" using command end-call
exit paragraph
.

Related

Is it possible to send arguments to Nightwatch from the command line?

I have a jenkins job that makes an XML request and returns an answer. From this answer I have a string I need on nightwatch to start the tests.
Does anyone know how I can send this string to nightwatch? Maybe via a command line argument? But how to read it next?
Since you're using a NodeJS-based framework, why not make use of a process.env variable?
Suppose you need to tell your script what environment you want to run your checks agains. Let's call our system variable ENV. Your command will become:
ENV=prod nightwatch nightwatch.conf.js --yourOtherSwitches
In your page-objects/feature-files, you call the variable using process.env.ENV.

Remote debug Idea doesn't works for openresty

I am using mobDebug. If run a lua script from command line everything works.
But when I run them from openresty the Idea doesn't stop. It only writes "Connected/ Disconnected"
Configs:
location / {
access_by_lua_block {
local client = require("client")
}
client.lua:
local mobdebug = require("mobdebug");
mobdebug.start()
local lfs = require("lfs")
print("Folder: "..lfs.currentdir())
modebug debug_hook is not invoked for needed lines, set_breakpoints don't invoked.
Idea Debug Logs, but nothing occures:
Idea catch debug from terminal client.lua; But it miss it from running nginx.
THIS IS NOT AN ANSWER. It's just that I am experiencing basically the same problem, and comment space is too small to fit all the relevant observations I would like to share:
I was actually able to stop immediately after mobdebug.start() in code running in nginx, and to step-debug - but only in code called directly from init_by_lua_block. This code of course executes once during the server startup or config reload.
I was never able to stop in worker code (e.g. rewrite_by_lua_*). mobdebug.coro() didn't help, and mobdebug.on() threw about "attempt to yield across C-call boundary"
I was only ever able to stop one time, on next statement after mobdebug.start(); once I hit |> (Resume program), it won't stop on any further breakpoints.
Using mobdebug.loop() is not a correct way to do this, as it's used for live coding, which is not going to work as expected with this setup. mobdebug.start() should be used instead.
Please see an example of how this debugging can be setup with ZeroBrane Studio here: http://notebook.kulchenko.com/zerobrane/debugging-openresty-nginx-lua-scripts-with-zerobrane-studio. All the details to how paths to mobdebug and required modules are configured should still be applicable to your environment.

How to send result file after all tests run in nunit console c#

Is there a way to send a mail with result file (I set this file in console command with option --result) after running.
I have run my selenium test cases in following way
How to Schedule Selenium Web Drivers Tests in C#
The result file was created after OneTimeTearDown function.
If sending an e-mail into OneTimeTearDown function - the result file comes incomplete
Thanks in advance
Sangeetha P.
I'm not sure I'd actually recommend doing this - but I think it's possible. Personally, I'd instead handle the email sending outside of the NUnit console, in a separate script in your CI System.
Anyway. You could achieve this by writing your own ResultWriter extension. Take a look at the implementation of the standard NUnit3XmlResultWriter as an idea - you'd essentially want the same thing, except to send the file by email, rather than write a file. (You may even want to make your ResultWriter actually inherit the NUnit3XmlResultWriter class.)

ZAP: Execute Script

I try to execute the community script "Extender/HTTP Message Logger.js". I first double click on the script to make it open in the scripting console. However, in the scripting console, the "Execute" button is disabled and I see no other way how to make it run.
What am I missing?
I think you're missing the message beneath the script which says:
Extender scripts add new functionality, including graphical elements
and new API end points.
Enabling a script installs it and disabling a script uninstalls it.
So you just need to enable the script (by right clicking it and selecting 'Enable') and then it will start working.
The actual issue was that I didn't read the script's code carefully: be default the script only logs JSON messages as defined on lines 17 and 43 and following. In order to log all the sent and received HTTP messages, I simply changed the isMessageToLog(log) function to always return true. After redeploying the script (disabling and enabling) it would log all HTTP messages.

How to Check FTP Connection via NSTask?

I want to write a cocoa application that checks if my ftp server is still up and running.
So far I learned that CFFTP could be used but this is not object oriented code so a no go for me. Also some people recommend ConnectionKit but that won't build on 10.7.
So my idea was to use terminal commands in my application with the help of NSTask.
The problem is: there are multiple commands that need to be executed, the first being
ftp ftp.foobar.com. Then I need to check if the response is ok or not. After that I will have to put in my username and password and also evaluate that output of that.
Does anyone know how the entire ftp connection handshake can be accomplished in Objective C via NSTask?
You could run
ftp -N /path/to/a/netrcfile
and try to parse the output.
I agree with #Rob Keniger in the comments, though - why not go for the C API? I am sure there is plenty of sample code out there to learn[*] from.
[*] Read: copy, then try to figure out why it does what it does