Giter Club home page Giter Club logo

quiver's Introduction

Quiver

main

Tools for testing the performance of messaging clients and servers.

$ quiver
---------------------- Sender -----------------------  --------------------- Receiver ----------------------  --------
Time [s]      Count [m]  Rate [m/s]  CPU [%]  RSS [M]  Time [s]      Count [m]  Rate [m/s]  CPU [%]  RSS [M]  Lat [ms]
-----------------------------------------------------  -----------------------------------------------------  --------
     2.2      2,495,486   1,246,497       82     11.4       2.1      2,367,633   1,183,225       89     10.2         0
     4.2      4,870,652   1,186,990       77     12.2       4.1      4,751,211   1,191,193       88     10.7         0
     6.2      7,244,794   1,186,478       77     12.2       6.1      7,123,233   1,185,418       89     10.7         0
     8.2      9,621,240   1,187,629       77     12.2       8.1      9,498,473   1,187,026       88     10.7         0
    10.2     11,757,474   1,067,583       70      0.0      10.1     11,756,478   1,128,438       84      0.0         0

CONFIGURATION

Sender ........................................ qpid-proton-c
Receiver ...................................... qpid-proton-c
URL ........................... amqp://localhost:56727/quiver
Output files ........................... /tmp/quiver-mv9r_g7t
Duration ................................................. 10 seconds
Body size ............................................... 100 bytes
Credit window ......................................... 1,000 messages

RESULTS

Count ............................................ 11,756,484 messages
Duration ................................................ 9.9 seconds
Sender rate ....................................... 1,188,705 messages/s
Receiver rate ..................................... 1,188,845 messages/s
End-to-end rate ................................... 1,188,724 messages/s

Latencies by percentile:

          0% ........ 0 ms       90.00% ........ 1 ms
         25% ........ 0 ms       99.00% ........ 1 ms
         50% ........ 1 ms       99.90% ........ 1 ms
        100% ........ 2 ms       99.99% ........ 1 ms

Overview

Quiver arrow implementations are native clients (and sometimes also servers) in various languages and APIs that either send or receive messages and write raw information about the transfers to standard output. They are deliberately simple.

The quiver-arrow command runs a single implementation in send or receive mode and captures its output. It has options for defining the execution parameters, selecting the implementation, and reporting statistics.

The quiver command launches a pair of quiver-arrow instances, one sender and one receiver, and produces a summary of the end-to-end transmission of messages.

Some client quiver arrows can authenticate to their peer using username and password or a client certificate.

Installation

Dependencies

Name Ubuntu packages Fedora packages
GCC C++ build-essential gcc-c++
GNU Make make make
Java 11 JDK openjdk-11-jdk java-11-openjdk-devel
Maven maven maven
Node.js nodejs nodejs
NumPy python-numpy, python3-numpy python-numpy, python3-numpy
OpenSSL openssl openssl
Python 3 python3 python3
Qpid Messaging C++ libqpidmessaging-dev, libqpidtypes-dev, libqpidcommon-dev qpid-cpp-client-devel
Qpid Proton C libqpid-proton-proactor1-dev qpid-proton-c-devel
Qpid Proton C++ libqpid-proton-cpp12-dev qpid-proton-cpp-devel
Qpid Proton Python python3-qpid-proton python3-qpid-proton
SASL libsasl2-2 libsasl2-dev libsasl2-modules sasl2-bin cyrus-sasl-devel cyrus-sasl-plain cyrus-sasl-md5
Unzip unzip unzip
zstd zstd zstd

Using Docker

$ sudo docker run -it ssorj/quiver

Installing on Ubuntu

Quiver requires newer versions of the Qpid dependencies than Ubuntu provides by default. Use these commands to install them from an Ubuntu PPA.

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:qpid/released
$ sudo apt-get update
$ sudo apt-get install build-essential make openjdk-11-jdk maven nodejs \
    python python-numpy python3 python3-numpy \
    libqpidmessaging-dev libqpidtypes-dev libqpidcommon-dev \
    libqpid-proton-proactor1-dev libqpid-proton-cpp12-dev \
    python-qpid python-qpid-messaging python3-qpid-proton \
    openssl unzip zstd

After this you can install from source.

To use the JavaScript implementation, you also need to symlink nodejs to node.

$ cd /usr/local/bin && sudo ln -s ../../bin/nodejs node

Installing from source

By default, installs from source go to /usr/local. Make sure /usr/local/bin is in your path.

$ cd quiver/
$ make build
$ sudo make install

Use the PREFIX option to change the install location.

$ make build PREFIX=/usr
$ sudo make install

Development

To setup paths in your development environment, source the devel.sh script from the project directory.

$ cd quiver/
$ source devel.sh

Project layout

devel.sh              # Sets up your project environment for development
Makefile              # Defines the build and test targets
bin/                  # Command-line tools
impls/                # Arrow and server implementations
scripts/              # Scripts called by Makefile rules
java/                 # Java library code
python/               # Python library code
build/                # The default build location

Make targets

In the development environment, most things are accomplished by running make targets. These are the important ones:

$ make build         # Builds the code
$ make install       # Installs the code
$ make clean         # Removes build/
$ make test          # Runs the test suite

Building against locally installed libraries

To alter the GCC library and header search paths, use the LIBRARY_PATH, C_INCLUDE_PATH, andCPLUS_INCLUDE_PATH environment variables.

$ export LIBRARY_PATH=$HOME/.local/lib64
$ export C_INCLUDE_PATH=$HOME/.local/include
$ export CPLUS_INCLUDE_PATH=$HOME/.local/include
$ make clean build

Set LD_LIBRARY_PATH or update ld.so.conf to match your LIBRARY_PATH before running the resulting executables.

$ export LD_LIBRARY_PATH=$HOME/.local/lib64

Source scripts/home-local-libs-env.sh or scripts/usr-local-libs-env.sh in your shell to set these variables for libraries under $HOME/.local or /usr/local respectively.

Command-line interface

quiver

This command starts a sender-receiver pair. Each sender or receiver is an invocation of the quiver-arrow command.

usage: quiver [-h] [--output DIR] [--impl IMPL] [--sender IMPL]
              [--receiver IMPL] [-d DURATION] [-c COUNT] [--rate COUNT]
              [--body-size COUNT] [--credit COUNT] [--transaction-size COUNT]
              [--durable] [--set-message-id] [--timeout DURATION] [--quiet]
              [--verbose] [--init-only] [--version] [--cert FILE] [--key FILE]
              [URL]

Start a sender-receiver pair for a particular messaging address.

'quiver' is one of the Quiver tools for testing the performance of
message servers and APIs.

positional arguments:
  URL                   The location of a message source or target (if not
                        set, quiver runs in peer-to-peer mode)

options:
  -h, --help            show this help message and exit
  --output DIR          Save output files to DIR
  --impl IMPL           Use IMPL to send and receive (default qpid-proton-c)
  --sender IMPL         Use IMPL to send (default qpid-proton-c)
  --receiver IMPL       Use IMPL to receive (default qpid-proton-c)
  -d DURATION, --duration DURATION
                        Stop after DURATION (default 30s)
  -c COUNT, --count COUNT
                        Send or receive COUNT messages (default 0, no limit)
  --rate COUNT          Target a rate of COUNT messages per second (default 0,
                        disabled)
  --body-size COUNT     Send message bodies containing COUNT bytes (default
                        100)
  --credit COUNT        Sustain credit for COUNT incoming messages (default
                        1000)
  --transaction-size COUNT
                        Transfer batches of COUNT messages inside transactions
                        (default 0, disabled)
  --durable             Require persistent store-and-forward transfers
  --set-message-id      Send each message with a message ID and read it on
                        receive
  --timeout DURATION    Fail after DURATION without transfers (default 10s)
  --quiet               Print nothing to the console
  --verbose             Print details to the console
  --init-only           Initialize and exit
  --version             Print the version and exit
  --cert FILE           The client TLS certificate file
  --key FILE            The client TLS private key file

URLs:
  [SCHEME:][//SERVER/]ADDRESS     The default server is 'localhost'
  queue0
  //localhost/queue0
  amqp://example.net:10000/jobs
  amqps://10.0.0.10/jobs/alpha
  amqps://username:[email protected]/jobs/alpha

count format:                     duration format:
  1 (no unit)    1                  1 (no unit)    1 second
  1k             1,000              1s             1 second
  1m             1,000,000          1m             1 minute
                                    1h             1 hour

arrow implementations:
  activemq-artemis-jms            Client mode only; requires Artemis server
  qpid-jms (jms)                  Client mode only
  qpid-proton-c (c)               The default implementation
  qpid-proton-cpp (cpp)
  qpid-proton-python (python, py)
  qpid-protonj2 (java)            Client mode only
  qpid-proton-dotnet (.NET)       Client mode only
  rhea (javascript, js)
  vertx-proton (java)             Client mode only

example peer-to-peer usage:
  $ quiver                        # Run the test using the default C arrow

example client-server usage:
  $ qdrouterd &                   # Start a server listening on localhost
  $ quiver q0                     # Run the test

quiver-arrow

This command sends or receives AMQP messages as fast as it can. Each invocation creates a single connection. It terminates when the requested duration is exceeded or the target number of messages are all sent or received.

usage: quiver-arrow [-h] [--output DIR] [--impl IMPL] [--summary] [--info]
                    [--id ID] [--server] [--passive] [--prelude PRELUDE]
                    [-d DURATION] [-c COUNT] [--rate COUNT]
                    [--body-size COUNT] [--credit COUNT]
                    [--transaction-size COUNT] [--durable] [--set-message-id]
                    [--timeout DURATION] [--quiet] [--verbose] [--init-only]
                    [--version] [--cert FILE] [--key FILE]
                    OPERATION URL

quiver-server

This command starts a server implementation and configures it to serve the given address.

usage: quiver-server [-h] [--impl IMPL] [--info] [--ready-file FILE]
                     [--prelude PRELUDE] [--user USER] [--password SECRET]
                     [--cert FILE] [--key FILE] [--trust-store FILE] [--quiet]
                     [--verbose] [--init-only] [--version]
                     URL

Examples

Running Quiver with ActiveMQ Classic

Make sure you configure ActiveMQ to allow anonymous connections.

$ <instance-dir>/bin/activemq start
$ quiver q0

Running Quiver with ActiveMQ Artemis

$ <instance-dir>/bin/artemis run &
$ <instance-dir>/bin/artemis queue create --name q0 --address q0 \
    --anycast --no-durable --auto-create-address --preserve-on-no-consumers
$ quiver q0

Running Quiver with Qpid Dispatch router

$ qdrouterd &
$ quiver q0

Running Quiver peer-to-peer

$ quiver
$ quiver --sender qpid-jms
$ quiver --sender rhea --receiver qpid-proton-python

More information

quiver's People

Contributors

alanconway avatar domstuchlik avatar franz1981 avatar garethahealy avatar gemmellr avatar grs avatar jiridanek avatar k-wall avatar kgiusti avatar pwright avatar ssorj avatar tabish121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

quiver's Issues

Openshift template example

It would be nice if there was an OCP template provided which can be used to run single quiver "jobs".

When working with customers, they normally want to performance test / validate their setups, quiver is a good fit for this use case. But when running in OCP, we need to create our own image/template.

Failing test - test_sasl fails in GitHub Actions with ubuntu-latest

test_sasl .............................................................. FAILED 2.8s
--- Error ---

Command 'quiver-arrow send 127.0.0.1:64364/q0 --impl qpid-jms --count 1 --verbose' returned non-zero exit status 1.
--- Output ---
quiver-server: Calling '/home/runner/work/quiver/quiver/build/quiver/impls/quiver-server-builtin host=127.0.0.1 port=64364 path=q0 ready-file=/tmp/plano-nibjg8ea scheme=amqp cert=/home/runner/work/quiver/quiver/build/quiver/python/quiver/test_tls_certs/tserver-certificate.pem key=/home/runner/work/quiver/quiver/build/quiver/python/quiver/test_tls_certs/tserver-private-key.pem key-
user=myuser ***'
quiver-arrow: Making directory '/tmp/quiver-tlt4o_ne'
quiver-arrow: Saving output files to '/tmp/quiver-tlt4o_ne'
quiver-arrow: Calling '/home/runner/work/quiver/quiver/build/quiver/impls/quiver-arrow-qpid-jms connection-mode=client channel-mode=active operation=send id=quiver-sender-8ca05c28 scheme=amqp host=127.0.0.1 port=64364 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0 username=myuser '
quiver-arrow-qpid-jms: Calling '/usr/bin/env -- java -Darrow.jms.url=amqp://127.0.0.1:64364?jms.clientID=quiver-sender-8ca05c28&jms.prefetchPolicy.all=1000&jms.username=myuser&jms.
-Djava.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -classpath /home/runner/work/quiver/quiver/build/quiver/java/quiver-qpid-jms.jar net.ssorj.quiver.QuiverArrowJms connection-mode=client channel-mode=active operation=send id=quiver-sender-8ca05c28 scheme=amqp host=127.0.0.1 port=64364 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0 username=myuser ***'
[main] ERROR org.apache.qpid.jms.JmsConnection - Failed to connect to remote at: amqp://127.0.0.1:64364
java.lang.RuntimeException: org.apache.qpid.jms.exceptions.JMSSecuritySaslException: Client failed to authenticate using SASL: PLAIN
at net.ssorj.quiver.Client.run(QuiverArrowJms.java:157)
at net.ssorj.quiver.QuiverArrowJms.doMain(QuiverArrowJms.java:79)
at net.ssorj.quiver.QuiverArrowJms.main(QuiverArrowJms.java:31)
Caused by: org.apache.qpid.jms.exceptions.JMSSecuritySaslException: Client failed to authenticate using SASL: PLAIN
at org.apache.qpid.jms.provider.exceptions.ProviderConnectionSecuritySaslException.toJMSException(ProviderConnectionSecuritySaslException.java:51)
at org.apache.qpid.jms.provider.exceptions.ProviderConnectionSecuritySaslException.toJMSException(ProviderConnectionSecuritySaslException.java:24)
at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)
at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)
at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:176)
at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:213)
at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:200)
at net.ssorj.quiver.Client.run(QuiverArrowJms.java:113)
... 2 more
Caused by: org.apache.qpid.jms.provider.exceptions.ProviderConnectionSecuritySaslException: Client failed to authenticate using SASL: PLAIN
at org.apache.qpid.jms.provider.amqp.AmqpSaslAuthenticator.recordFailure(AmqpSaslAuthenticator.java:160)
at org.apache.qpid.jms.provider.amqp.AmqpSaslAuthenticator.handleSaslFail(AmqpSaslAuthenticator.java:138)
at org.apache.qpid.jms.provider.amqp.AmqpSaslAuthenticator.handleSaslOutcome(AmqpSaslAuthenticator.java:109)
at org.apache.qpid.jms.provider.amqp.AmqpProvider$1.onSaslOutcome(AmqpProvider.java:281)
at org.apache.qpid.proton.engine.impl.SaslImpl.handleOutcome(SaslImpl.java:451)
at org.apache.qpid.proton.engine.impl.SaslImpl.handleOutcome(SaslImpl.java:49)
at org.apache.qpid.proton.amqp.security.SaslOutcome.invoke(SaslOutcome.java:75)
at org.apache.qpid.proton.engine.impl.SaslImpl.handle(SaslImpl.java:345)
at org.apache.qpid.proton.engine.impl.SaslFrameParser.input(SaslFrameParser.java:375)
at org.apache.qpid.proton.engine.impl.SaslImpl$SaslTransportWrapper.reallyProcessInput(SaslImpl.java:688)
at org.apache.qpid.proton.engine.impl.SaslImpl$SaslTransportWrapper.process(SaslImpl.java:659)
at org.apache.qpid.proton.engine.impl.SaslImpl$SwitchingSaslTransportWrapper.process(SaslImpl.java:832)
at org.apache.qpid.proton.engine.impl.HandshakeSniffingTransportWrapper.process(HandshakeSniffingTransportWrapper.java:101)
at org.apache.qpid.proton.engine.impl.TransportImpl.process(TransportImpl.java:1572)
at org.apache.qpid.jms.provider.amqp.AmqpProvider.onData(AmqpProvider.java:866)
at org.apache.qpid.jms.transports.netty.NettyTcpTransport$NettyTcpTransportHandler.channelRead0(NettyTcpTransport.java:563)
at org.apache.qpid.jms.transports.netty.NettyTcpTransport$NettyTcpTransportHandler.channelRead0(NettyTcpTransport.java:556)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:829)
quiver-arrow: Error: Sender exited with code 1
quiver-server: Exiting with code -15
RESULT: 1 test failed (7 skipped)
make: *** [Makefile:128: test] Error 1

Failing test - test_pair_qpid_protonj2_to_rhea fails with an error reading the SendTime property

test_pair_qpid_protonj2_to_rhea ........................................ FAILED    2.3s
--- Error ---
> Command 'quiver --sender qpid-protonj2 --receiver rhea --count 1 --verbose' returned non-zero exit status 1.
--- Output ---
> quiver: Calling 'quiver-arrow receive amqp://localhost:56727/quiver --impl rhea --duration 30s --count 1 --rate 0 --body-size 100 --credit 1000 --transaction-size 0 --timeout 10 --verbose --output /tmp/quiver-n8eylbeo --server --passive'
> quiver-arrow: Making directory '/tmp/quiver-n8eylbeo'
> quiver-arrow: Saving output files to '/tmp/quiver-n8eylbeo'
> quiver-arrow: Calling '/home/jross/code/quiver/build/quiver/impls/quiver-arrow-rhea connection-mode=server channel-mode=passive operation=receive id=quiver-receiver-179834c9 scheme=amqp host=localhost port=56727 path=quiver duration=30 count=1 rate=0 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> (node:1963217) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
> (Use `node --trace-deprecation ...` to show where the warning was created)
> quiver: Calling 'quiver-arrow send amqp://localhost:56727/quiver --impl qpid-protonj2 --duration 30s --count 1 --rate 0 --body-size 100 --credit 1000 --transaction-size 0 --timeout 10 --verbose --output /tmp/quiver-n8eylbeo'
> [connection-1] disconnected 
> quiver-arrow: Making directory '/tmp/quiver-n8eylbeo'
> quiver-arrow: Saving output files to '/tmp/quiver-n8eylbeo'
> quiver-arrow: Calling '/home/jross/code/quiver/build/quiver/impls/quiver-arrow-qpid-protonj2 connection-mode=client channel-mode=active operation=send id=quiver-sender-adad2660 scheme=amqp host=localhost port=56727 path=quiver duration=30 count=1 rate=0 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> quiver-arrow-qpid-protonj2: Calling '/usr/bin/env -- java -classpath /home/jross/code/quiver/build/quiver/java/quiver-protonj2.jar -Dorg.slf4j.simpleLogger.defaultLogLevel=warn net.ssorj.quiver.QuiverArrowProtonJ2 connection-mode=client channel-mode=active operation=send id=quiver-sender-adad2660 scheme=amqp host=localhost port=56727 path=quiver duration=30 count=1 rate=0 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> node:events:498
>       throw er; // Unhandled 'error' event
>       ^
> 
> TypeError: Cannot read properties of undefined (reading 'SendTime')
>     at Container.<anonymous> (/home/jross/code/quiver/build/quiver/impls/quiver-arrow-rhea:207:48)
>     at Container.emit (node:events:520:28)
>     at Container.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/container.js:41:33)
>     at Connection.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/connection.js:261:40)
>     at Session.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/session.js:456:41)
>     at Receiver.link.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/link.js:62:38)
>     at Incoming.on_transfer (/home/jross/.local/lib/node_modules/rhea/lib/session.js:365:22)
>     at Session.on_transfer (/home/jross/.local/lib/node_modules/rhea/lib/session.js:759:19)
>     at Connection.<computed> [as on_transfer] (/home/jross/.local/lib/node_modules/rhea/lib/connection.js:836:30)
>     at c.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/types.js:946:33)
> Emitted 'error' event on Container instance at:
>     at Container.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/container.js:41:33)
>     at Connection.dispatch (/home/jross/.local/lib/node_modules/rhea/lib/connection.js:261:40)
>     at Connection.input (/home/jross/.local/lib/node_modules/rhea/lib/connection.js:574:18)
>     at Socket.emit (node:events:520:28)
>     at addChunk (node:internal/streams/readable:315:12)
>     at readableAddChunk (node:internal/streams/readable:289:9)
>     at Socket.Readable.push (node:internal/streams/readable:228:10)
>     at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
> org.apache.qpid.protonj2.client.exceptions.ClientConnectionRemotelyClosedException: Remote closed connection unexpectedly
> 	at org.apache.qpid.protonj2.client.impl.ClientExceptionSupport.convertToConnectionClosedException(ClientExceptionSupport.java:157)
> 	at org.apache.qpid.protonj2.client.impl.ClientTransportListener.transportError(ClientTransportListener.java:69)
> 	at org.apache.qpid.protonj2.client.transport.TcpTransport.handleTransportFailure(TcpTransport.java:342)
> 	at org.apache.qpid.protonj2.client.transport.TcpTransport$NettyDefaultHandler.channelInactive(TcpTransport.java:455)
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
> 	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
> 	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
> 	at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
> 	at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813)
> 	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
> 	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
> 	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
> 	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391)
> 	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
> 	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
> 	at java.base/java.lang.Thread.run(Thread.java:833)
> Caused by: java.io.IOException: Remote closed connection unexpectedly
> 	... 16 more
> quiver-arrow: Error: Receiver exited with code 1
> quiver: Error: Command 'quiver-arrow receive amqp://localhost:56727/quiver --impl rhea --duration 30s --count 1 --rate 0 --body-size 100 --credit 1000 --transaction-size 0 --timeout 10 --verbose --output /tmp/quiver-n8eylbeo --server --passive' returned non-zero exit status 1.
> quiver: Stopping process 1963228 (quiver-arrow)
> quiver-arrow: Exiting with code -15
> quiver-arrow: Stopping process 1963230 (/home/jross/code/quiver/build/quiver/impls/quiver-arrow-qpid-protonj2)
> quiver: Stopping process 1963216 (quiver-arrow)
> quiver: Error: Exiting with code 1
> ---------------------- Sender -----------------------  --------------------- Receiver ----------------------  --------
> Time [s]      Count [m]  Rate [m/s]  CPU [%]  RSS [M]  Time [s]      Count [m]  Rate [m/s]  CPU [%]  RSS [M]  Lat [ms]
> -----------------------------------------------------  -----------------------------------------------------  --------
>        -              -           -        -        -       2.1              0           0        4      0.0         0

potential changes/improvements for JMS sender/receiver

There are a few changes/improvements that could be made:

  • A time stamp is being added to the message as a property, but every message sent already has a millisecond precision timestamp added to it automatically during send (JMSTimestamp). If really not using that timestamp, a hint can be given on the producer to disable it.
  • The setJMSMessageID method (and many other setters on the message) isn't actually for application use, but rather provider/client user, so the MessageID currently being set before send will be overwritten by the client during the send. If not using the built in message ID, a hint can again be given on the producer to disable the message id addition.
  • Not creating a new array for every send. The contract of BytesMessage is such that it copies the bytes written to it, so creating the array each time isn't really making a difference except to do more work and generate additional garbage leading to increased GC activity.

TLS - support for amqps:// urls

It would be useful if quiver understood amqps:// urls in order to form TLS connections to the server peers. In additional, it would be useful if they was a way of turning off certificate and hostname verification.

Authentication mechanism

There seems to not to be a way of passing username and password. Or at least it is not documented.

Package quiver for Fedora 27

Hello,
I am trying to integrate Quiver as a test agent into Maestro and I noticed that the package for Fedora 27 is missing on COPR. Would it be possible to trigger a build and package it for Fedora 27 as well?

Thanks

Make all quiver dependencies optional

Just pulled the latest quiver and it refused to install without numpy. It'll be important for quiver to install easily no matter what subset of clients/brokers etc. are available. Simplest way to detect dependencies would be just try to build everything and report the failures but carry on and install whatever succeeds.

vertx-proton fails to connect via OCP service

When using the docker image, on OCP, i get DNS issues when trying to use the svc name.

i.e.:

$ oc get svc
NAME                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
broker-amq-amqp      ClusterIP   172.30.202.38    <none>        5672/TCP    1h
broker-amq-jolokia   ClusterIP   172.30.210.19    <none>        8161/TCP    1h
broker-amq-mqtt      ClusterIP   172.30.252.11    <none>        1883/TCP    1h
broker-amq-stomp     ClusterIP   172.30.146.201   <none>        61613/TCP   1h
broker-amq-tcp       ClusterIP   172.30.122.52    <none>        61616/TCP   1h

$ oc process -f https://raw.githubusercontent.com/ssorj/quiver/0.2.0/packaging/openshift/openshift-pod-template.yml \
           DOCKER_IMAGE=docker.io/ssorj/quiver:latest \
           DOCKER_CMD="[\"quiver\", \"//broker-amq-amqp:5672/vertx-proton\", \"--impl\", \"vertx-proton\", \"--verbose\"]" \
           | oc create -f -

Gives me; "UnknownHostException: failed to resolve 'broker-amq-amqp' after 3 queries"

If i try with the IP of the svc, it works:

$ oc process -f https://raw.githubusercontent.com/ssorj/quiver/0.2.0/packaging/openshift/openshift-pod-template.yml \
           DOCKER_IMAGE=docker.io/ssorj/quiver:latest \
           DOCKER_CMD="[\"quiver\", \"//172.30.202.38:5672/vertx-proton\", \"--impl\", \"vertx-proton\", \"--verbose\"]" \
           | oc create -f - 

Other impls all work via the svc name. Do i need to pass extra args for vertx-proton?

Support target throughput benchmarks and microseconds precision

In order to allow fair comparisons of resource utilization and/or latencies between runs that push different load against a system, would be great to have a target throughput benchmark mode.
Given that sustainable throughput would produce tons of small latency values would be good to have
microseconds timestamp precision too (if the OS allow it).
#38 is addressing the former while https://github.com/franz1981/quiver/tree/micros_latencies need some refinement on python side to cover the latter.

Installation does not work

Fedora 24

dnf install -y 'dnf-command(copr)' && \
dnf copr enable -y jross/ssorj && \
dnf install -y qpid-proton-c && \
dnf install -y quiver
Error: nothing provides libqpid-proton.so.8()(64bit) needed by quiver-0-0.1.20161116.8bc457a.fc24.x86_64

Failing test - test_anonymous_tls - certificate verify failed

[jross@localhost quiver (master)]$ quiver-test quiver.tests:test_anonymous_tls
quiver-test: Running tests from module 'quiver.tests'
test_anonymous_tls ..................................................... FAILED    6.8s
--- Error ---
> Command 'quiver-arrow send amqps://127.0.0.1:62497/q0 --impl qpid-proton-cpp --count 1 --verbose' returned non-zero exit status 1.
--- Output ---
> quiver-server: Calling '/home/jross/code/quiver/build/quiver/impls/quiver-server-builtin host=127.0.0.1 port=62497 path=q0 ready-file=/run/user/1000/plano-9jpbrusg scheme=amqps cert=/home/jross/code/quiver/build/quiver/python/quiver/test_tls_certs/tserver-certificate.pem key=/home/jross/code/quiver/build/quiver/python/quiver/test_tls_certs/tserver-private-key.pem key-password=password'
> quiver-arrow: Making directory '/tmp/quiver-ehm5917i'
> quiver-arrow: Saving output files to '/tmp/quiver-ehm5917i'
> quiver-arrow: Calling '/home/jross/code/quiver/build/quiver/impls/quiver-arrow-qpid-jms connection-mode=client channel-mode=active operation=send id=quiver-sender-430578f5 scheme=amqps host=127.0.0.1 port=62497 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> quiver-arrow-qpid-jms: Calling '/usr/bin/env -- java -Darrow.jms.url=amqps://127.0.0.1:62497?jms.clientID=quiver-sender-430578f5&jms.prefetchPolicy.all=1000&transport.verifyHost=false&transport.trustAll=true&amqp.saslMechanisms=ANONYMOUS -Djava.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -classpath /home/jross/code/quiver/build/quiver/java/quiver-qpid-jms.jar net.ssorj.quiver.QuiverArrowJms connection-mode=client channel-mode=active operation=send id=quiver-sender-430578f5 scheme=amqps host=127.0.0.1 port=62497 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> quiver-arrow: Calling 'xz --compress -0 --threads 0 /tmp/quiver-ehm5917i/sender-transfers.csv'
> quiver-arrow: Making directory '/tmp/quiver-gt2emy_i'
> quiver-arrow: Saving output files to '/tmp/quiver-gt2emy_i'
> quiver-arrow: Calling '/home/jross/code/quiver/build/quiver/impls/quiver-arrow-qpid-jms connection-mode=client channel-mode=active operation=receive id=quiver-receiver-c0d76b5b scheme=amqps host=127.0.0.1 port=62497 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> quiver-arrow-qpid-jms: Calling '/usr/bin/env -- java -Darrow.jms.url=amqps://127.0.0.1:62497?jms.clientID=quiver-receiver-c0d76b5b&jms.prefetchPolicy.all=1000&transport.verifyHost=false&transport.trustAll=true&amqp.saslMechanisms=ANONYMOUS -Djava.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -classpath /home/jross/code/quiver/build/quiver/java/quiver-qpid-jms.jar net.ssorj.quiver.QuiverArrowJms connection-mode=client channel-mode=active operation=receive id=quiver-receiver-c0d76b5b scheme=amqps host=127.0.0.1 port=62497 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> quiver-arrow: Calling 'xz --compress -0 --threads 0 /tmp/quiver-gt2emy_i/receiver-transfers.csv'
> quiver-arrow: Making directory '/tmp/quiver-pvihjf1f'
> quiver-arrow: Saving output files to '/tmp/quiver-pvihjf1f'
> quiver-arrow: Calling '/home/jross/code/quiver/build/quiver/impls/quiver-arrow-qpid-proton-cpp connection-mode=client channel-mode=active operation=send id=quiver-sender-f37452b4 scheme=amqps host=127.0.0.1 port=62497 path=q0 duration=0 count=1 body-size=100 credit-window=1000 transaction-size=0 durable=0'
> quiver-arrow: error: amqp:connection:framing-error: SSL Failure: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
> quiver-arrow: Error: Sender exited with code 1
> quiver-server: Exiting with code -15
RESULT: 1 test failed (0 skipped)

Update to Jakarta JMS and possibly remove ActiveMQ 5 target

The current JMS clients have all started jumping to Jakarta JMS except for ActiveMQ 5 which is still a JMS 1.1 client and is not actively developed these days beyond where it was years ago. Moving on to Jakarta would allow the client to be updated to latest releases beyond the older ones stuck on the (javax) JMS API dependencies

Use a separate jar for each client instead of one Uber Jar

Looks like the project currently creates a single Uber jar for all the JMS clients which seems to be creating some trouble when trying to use snapshots of the various clients. I think the trouble might lay in the fact that with only one jar you won't know what version of the dependencies each client brings in ultimately ends up in the final jar. For instance upstream Qpid JMS is on Netty 4.1.5.final but I believe the Artemis core client will fight to bring in an old 4.0.x version of Netty which will probably result in errors at runtime for Qpid JMS.

By having a single uber jar for each JMS client you will have better version isolation for the various dependencies each one brings in.

Timeouts

I am not, yet, sure if this is a bug ... however, when I try running quiver, it is failing with timeout errors:

quiver amqp://:5672/q0
quiver-arrow: Error: Receiver timed out
quiver-arrow: Error: Sender timed out
quiver: Error: Exiting with code 1

I have tried a couple of different ways and targets with this: Artemis 2.5.0 on VM and on a Physical Hardware, Qpid Dispatch Router on a VM. I checked the network and it is reliable. I also verified, when using the Broker, that messages do arrive on the queue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.