Skip to content

Commit

Permalink
fix: Propogate context in SinglePartitionPublisherBuilder. (#63)
Browse files Browse the repository at this point in the history
Co-authored-by: dpcollins-google <dpcollins-google@github.com>
  • Loading branch information
dpcollins-google and dpcollins-google committed May 20, 2020
1 parent 1b9770e commit 8b2d525
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public abstract static class Builder {
public SinglePartitionPublisher build() throws StatusException {
SinglePartitionPublisherBuilder builder = autoBuild();
PublisherBuilder.Builder publisherBuilder =
PublisherBuilder.builder().setTopic(builder.topic()).setPartition(builder.partition());
PublisherBuilder.builder()
.setTopic(builder.topic())
.setPartition(builder.partition())
.setContext(builder.context());
builder.stub().ifPresent(publisherBuilder::setStub);
builder.batchingSettings().ifPresent(publisherBuilder::setBatching);
return new SinglePartitionPublisher(publisherBuilder.build(), builder.partition());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public void onFailure(Throwable t) {
errorsSinceLastFinish.push(ExtractStatus.toCanonical(t));
}
}
}, executor);
},
executor);
}

// Intentionally don't flush on bundle finish to allow multi-sink client reuse.
Expand Down

0 comments on commit 8b2d525

Please sign in to comment.