Search in sources :

Example 1 with ListTransactionsRequestData

use of org.apache.kafka.common.message.ListTransactionsRequestData in project kafka by apache.

the class ListTransactionsHandler method buildRequest.

@Override
public ListTransactionsRequest.Builder buildRequest(int brokerId, Set<AllBrokersStrategy.BrokerKey> keys) {
    ListTransactionsRequestData request = new ListTransactionsRequestData();
    request.setProducerIdFilters(new ArrayList<>(options.filteredProducerIds()));
    request.setStateFilters(options.filteredStates().stream().map(TransactionState::toString).collect(Collectors.toList()));
    return new ListTransactionsRequest.Builder(request);
}
Also used : TransactionState(org.apache.kafka.clients.admin.TransactionState) ListTransactionsRequestData(org.apache.kafka.common.message.ListTransactionsRequestData)

Aggregations

TransactionState (org.apache.kafka.clients.admin.TransactionState)1 ListTransactionsRequestData (org.apache.kafka.common.message.ListTransactionsRequestData)1