dehora / nakadi-java

🌀 Client library for the Nakadi Event Broker (examples: http://bit.ly/njc-examples, site: https://dehora.github.io/nakadi-java/)
MIT License
30 stars 19 forks source link

make BatchItemResponse.PublishingStatus public #264

Closed kanuku closed 7 years ago

kanuku commented 7 years ago

When publishing a batch of events one would like to find out which events failed by filtering for the returned eid in the failing BatchItemresponse.

        EnumSet<BatchItemResponse.PublishingStatus> errors = EnumSet.of(
                BatchItemResponse.PublishingStatus.failed,
                BatchItemResponse.PublishingStatus.aborted
                );
        BatchItemResponseCollection sendBatch = client.resources()//
                .events()//
                .sendBatch(eventTypeName, events);
        sendBatch.items().stream().filter((response)->{
            erraneous.contains( response.publishingStatus())
        });

Currently the problem is that the enum BatchItemResponse.PublishingStatus used to represent the publishing status of a batchItem is not reachable (protected) at all.

dehora commented 7 years ago

available in 0.9.7