Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIP-23: Pulsar Java Client Interceptors. #2471

Merged
merged 85 commits into from
Sep 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fc7dd11
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
2d6eec9
Fix bug of ProducerInterceptors in method before send.
Aug 24, 2018
06003bd
Add interceptors on send acknowledgement.
Aug 27, 2018
c5eb659
Add UT for ProducerInterceptor.
Aug 27, 2018
a47ef10
Fix import.
Aug 27, 2018
f12c607
Add consumer interceptors.
Aug 28, 2018
233e10f
Implement onAcknowledge interceptors.
Aug 29, 2018
936ae3c
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
33ff337
Fix bug of ProducerInterceptors in method before send.
Aug 24, 2018
df8ac18
Add interceptors on send acknowledgement.
Aug 27, 2018
1603ba2
Add UT for ProducerInterceptor.
Aug 27, 2018
2f0fb44
Fix import.
Aug 27, 2018
15a309a
Add consumer interceptors.
Aug 28, 2018
7cab52e
Implement onAcknowledge interceptors.
Aug 29, 2018
0368421
Merge remote-tracking branch 'origin/PIP-23' into PIP-23
Aug 29, 2018
60df52e
Fix Conflicts.
Aug 29, 2018
1304dd9
Fix since a single "interceptor" instance might be added to multiple …
Aug 30, 2018
e60eca9
Rename cause to exception in interceptor.
Aug 30, 2018
200d842
Include topic and consumer name in the log message for ConsumerInterc…
Aug 30, 2018
0bd4189
Delete unused param.
Aug 30, 2018
e21347e
Include topic name in log message
Aug 30, 2018
f4b29c0
Add a comment on why we are retaining the buffer.
Aug 30, 2018
13c3ee8
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
ce5ff8a
Fix bug of ProducerInterceptors in method before send.
Aug 24, 2018
6fbda5c
Add interceptors on send acknowledgement.
Aug 27, 2018
5525f66
Add UT for ProducerInterceptor.
Aug 27, 2018
8c3565c
Fix import.
Aug 27, 2018
5d0b750
Add consumer interceptors.
Aug 28, 2018
cddc5dd
Implement onAcknowledge interceptors.
Aug 29, 2018
f30a486
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
17d01d5
Fix bug of ProducerInterceptors in method before send.
Aug 24, 2018
60718db
Add interceptors on send acknowledgement.
Aug 27, 2018
6563ae0
Add UT for ProducerInterceptor.
Aug 27, 2018
1b1385b
Fix import.
Aug 27, 2018
a7693b2
Add consumer interceptors.
Aug 28, 2018
bdcaa2f
Implement onAcknowledge interceptors.
Aug 29, 2018
e643180
Fix Conflicts.
Aug 29, 2018
c5a66dd
Fix since a single "interceptor" instance might be added to multiple …
Aug 30, 2018
3bf482d
Rename cause to exception in interceptor.
Aug 30, 2018
341adb1
Include topic and consumer name in the log message for ConsumerInterc…
Aug 30, 2018
751abc2
Delete unused param.
Aug 30, 2018
69f9d5f
Include topic name in log message
Aug 30, 2018
d605cad
Add a comment on why we are retaining the buffer.
Aug 30, 2018
df36eab
Merge remote-tracking branch 'origin/PIP-23' into PIP-23
Aug 30, 2018
32a8acd
Revert "Add a comment on why we are retaining the buffer. Add try/fin…
Aug 30, 2018
de45453
Merge remote-tracking branch 'origin/PIP-23' into PIP-23
Aug 30, 2018
19cd18f
Revert "Revert "Add a comment on why we are retaining the buffer. Add…
Aug 30, 2018
1a15c9c
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
4e6f0eb
Fix import.
Aug 27, 2018
048560a
Add consumer interceptors.
Aug 28, 2018
15f59b2
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
27aa181
Add UT for ProducerInterceptor.
Aug 27, 2018
e60c3a5
Fix import.
Aug 27, 2018
eedd217
Add consumer interceptors.
Aug 28, 2018
9ffcdd0
Implement onAcknowledge interceptors.
Aug 29, 2018
473186b
Fix since a single "interceptor" instance might be added to multiple …
Aug 30, 2018
aaffaf7
Revert "Add a comment on why we are retaining the buffer. Add try/fin…
Aug 30, 2018
6a65e08
Revert "Revert "Add a comment on why we are retaining the buffer. Add…
Aug 30, 2018
f311710
Merge apache master
Aug 30, 2018
9dfd872
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
d3bacbd
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
9f0ae31
Fix import.
Aug 27, 2018
2e2a58a
Add consumer interceptors.
Aug 28, 2018
42bd44e
Fix since a single "interceptor" instance might be added to multiple …
Aug 30, 2018
c4c4ec0
Revert "Add a comment on why we are retaining the buffer. Add try/fin…
Aug 30, 2018
5e21b3a
Revert "Revert "Add a comment on why we are retaining the buffer. Add…
Aug 30, 2018
4e7b834
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
efc366b
Fix import.
Aug 27, 2018
32df618
Add consumer interceptors.
Aug 28, 2018
a04735b
Add ProducerInterceptor.java and ConsumerInterceptor.java
Aug 23, 2018
feeaf80
Fix import.
Aug 27, 2018
2a3c908
Add consumer interceptors.
Aug 28, 2018
dab7a7c
Fix since a single "interceptor" instance might be added to multiple …
Aug 30, 2018
d617b39
Revert "Add a comment on why we are retaining the buffer. Add try/fin…
Aug 30, 2018
e0dba53
Revert "Revert "Add a comment on why we are retaining the buffer. Add…
Aug 30, 2018
aa95a30
Merge apache master
Aug 30, 2018
c896658
Merge branch 'master' into PIP-23
merlimat Sep 2, 2018
a2116ba
Merge remote-tracking branch 'apache/master' into PIP-23
Sep 4, 2018
7b29f1d
Merge remote-tracking branch 'origin/PIP-23' into PIP-23
Sep 4, 2018
90dca29
Fix bug in ContextImplTest in mock producer.
Sep 4, 2018
e89b830
Fix bugs with message meta builder recycle().
Sep 4, 2018
a94d34d
(Lazy load properties)Load properties when has interceptors.
Sep 4, 2018
97be8b4
Fix ReplicatorTest and V1_ReplicatorTest
sijie Sep 4, 2018
606ce36
Merge remote-tracking branch 'codelipenghui/PIP-23' into PIP-23
sijie Sep 4, 2018
0d80d9a
Merge branch 'master' into PIP-23
merlimat Sep 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static class RawConsumerImpl extends ConsumerImpl<byte[]> {
consumerFuture,
SubscriptionMode.Durable,
MessageId.earliest,
Schema.BYTES);
Schema.BYTES, null);
incomingRawMessages = new GrowableArrayBlockingQueue<>();
pendingRawReceives = new ConcurrentLinkedQueue<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.matches;
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.doAnswer;
Expand All @@ -36,7 +37,6 @@
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
Expand Down Expand Up @@ -80,7 +80,6 @@
import org.apache.pulsar.broker.cache.ConfigurationCacheService;
import org.apache.pulsar.broker.cache.LocalZooKeeperCacheService;
import org.apache.pulsar.broker.namespace.NamespaceService;
import org.apache.pulsar.broker.service.Topic.PublishContext;
import org.apache.pulsar.broker.service.nonpersistent.NonPersistentReplicator;
import org.apache.pulsar.broker.service.persistent.CompactorSubscription;
import org.apache.pulsar.broker.service.persistent.PersistentDispatcherMultipleConsumers;
Expand Down Expand Up @@ -1224,7 +1223,7 @@ public void testClosingReplicationProducerTwice() throws Exception {
verify(clientImpl)
.createProducerAsync(
any(ProducerConfigurationData.class),
any(Schema.class)
any(Schema.class), eq(null)
);

replicator.disconnect(false);
Expand All @@ -1235,7 +1234,7 @@ public void testClosingReplicationProducerTwice() throws Exception {
verify(clientImpl, Mockito.times(2))
.createProducerAsync(
any(ProducerConfigurationData.class),
any(Schema.class)
any(Schema.class), any(null)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.pulsar.broker.service;

import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.spy;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
Expand Down Expand Up @@ -242,7 +243,7 @@ public void testConcurrentReplicator() throws Exception {
Thread.sleep(3000);

Mockito.verify(pulsarClient, Mockito.times(1)).createProducerAsync(Mockito.any(ProducerConfigurationData.class),
Mockito.any(Schema.class));
Mockito.any(Schema.class), eq(null));

client1.shutdown();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.pulsar.broker.service.v1;

import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.spy;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
Expand Down Expand Up @@ -241,7 +242,7 @@ public void testConcurrentReplicator() throws Exception {
Thread.sleep(3000);

Mockito.verify(pulsarClient, Mockito.times(1)).createProducerAsync(Mockito.any(ProducerConfigurationData.class),
Mockito.any(Schema.class));
Mockito.any(Schema.class), eq(null));

client1.shutdown();
}
Expand Down
Loading