Skip to content

Release Notes Draft

Richard Hightower edited this page Nov 2, 2015 · 54 revisions

1) Ability to specify "application/json" and HttpTextResponse working with swagger

QBit now support specifying the contentType. The default contentType is "application/json".

    @RequestMapping(value = "/hello8", contentType = "application/xml", code = HttpStatus.CREATED)
    public void hello8(final Callback<HttpTextResponse> callback) {

        final HttpTextResponse response = HttpResponseBuilder
                .httpResponseBuilder()
                .setBody("<xml><hi>hello world</hi></xml>")
                .setCode(201).buildTextResponse();
        callback.returnThis(response);
    }

Swagger meta data generation now works with HttpTextResponse and HttpBinaryResponse. However if you use HttpTextResponse or HttpBinaryResponse there is no way to specify a response schema so generating clients might be suspect.

Related issues:

2) Bug fix Scala integration

QBit now ignores Scala generated methods. Issue

3) Support @GET, @DELETE, @HEAD, @POST, @PUT

Support @GET, @DELETE, @HEAD, @POST, @PUT annotation in addition to @RequestMapping.

The new annotations works like @RequestMapping except they default to the corresponding HTTP methods by default.

Issue

3) If batching is set to 1, create a no batch queue

We created a new queue sender that does not do batching. This way if batching is set to 1 on the QueueBuilder, QBit create a no batch queue so that we are not creating arrays and keeping the GC busy.

Issue

4) Add support to make a blocking call to a non-blocking interface via a blocking get/Future operation

Let's say you have an service as follows:

    interface Foo {
        void getValue(Callback<Boolean> callback);
    }

    static class FooService implements Foo {

        @Override
        public void getValue(Callback<Boolean> callback) {
            callback.accept(true);
        }
    }
        serviceQueue = ServiceBuilder.serviceBuilder().setServiceObject(new FooService()).buildAndStartAll();
        foo = serviceQueue.createProxy(Foo.class);

The call is async but for a test or some other reason, you want to call it and get an immediate result (QBit goes out of its way to make everything async, but sometimes especially for testing, you want to make a synchronous call).

Now you can!

        final AsyncFutureCallback<Boolean> callback = AsyncFutureBuilder
                .asyncFutureBuilder().setSupportLatch(true).build(Boolean.class);

        foo.getValue(callback);

        ServiceProxyUtils.flushServiceProxy(foo);

        final Boolean result = callback.get();

        assertTrue(result);

Issue

5) Add debugging for non started queues and queues that are filling up

If you set these env variable or system properties,

    private final boolean checkStart = Sys.sysProp("QBIT_CHECK_START", false);
    private final int checkStartWarnEvery = Sys.sysProp("QBIT_CHECK_START_WARN_EVERY", 100);
    private final boolean checkQueueSize = Sys.sysProp("QBIT_CHECK_QUEUE_SIZE", false);
    private final int checkQueueSizeWarnIfOver = Sys.sysProp("QBIT_CHECK_QUEUE_SIZE_WARN_IF_OVER", 10);

Then QBit will check to see if a queue was started and issues warning if it was not started. You can leave this on and check every 100 times or you can check every time for debugging.

You can also instruct QBit to check for queues whose size are over a certain limit.

These setting are off by default and are mainly used during development to make sure you have setup QBit correctly.

You should not really use these outside of development as there is a performance cost to the checks.

Issue

Tutorials

__

Docs

Getting Started

Basics

Concepts

REST

Callbacks and Reactor

Event Bus

Advanced

Integration

QBit case studies

QBit 2 Roadmap

-- Related Projects

Kafka training, Kafka consulting, Cassandra training, Cassandra consulting, Spark training, Spark consulting

Clone this wiki locally