Skip to content

Dependency of pulsar/client/api on pulsar/client/impl #248

Closed

Description

@jai1

Issue

To the best of my knowledge, pulsar/client/api should not have dependency on pulsar/client/impl

Actual behavior

pulsar/client/api has dependency in pulsar/client/impl, I think we should create interfaces and remove these dependencies :

./AuthenticationFactory.java:import com.yahoo.pulsar.client.impl.auth.AuthenticationDisabled;
./ClientConfiguration.java:import com.yahoo.pulsar.client.impl.auth.AuthenticationDisabled;
./Consumer.java:import com.yahoo.pulsar.client.impl.BrokerConsumerStats;
./Consumer.java:import com.yahoo.pulsar.client.impl.ConsumerStats;
./MessageBuilder.java:import com.yahoo.pulsar.client.impl.MessageBuilderImpl;
./MessageId.java:import com.yahoo.pulsar.client.impl.MessageIdImpl;
./Producer.java:import com.yahoo.pulsar.client.impl.ProducerStats;
./ProducerConfiguration.java:import com.yahoo.pulsar.client.impl.RoundRobinPartitionMessageRouterImpl;
./ProducerConfiguration.java:import com.yahoo.pulsar.client.impl.SinglePartitionMessageRouterImpl;
./PulsarClient.java:import com.yahoo.pulsar.client.impl.PulsarClientImpl;

Steps to reproduce

Code Inspection

System configuration

Pulsar version: x.y

Activity

  1. added
    doc
    deprecated/question
    on Feb 27, 2017
  2. merlimat commented on Feb 28, 2017

    @merlimat
    Contributor

    I don't see a way to do it with the current API. To be able to do :

    PulsarClient client = PulsarClient.create("...");

    You need to refer to the impl from the api package.

    I don't think this is a problem though, since all the code is in the same maven module anyway, and you can still provide an alternative implementation of the api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecated/questiondoc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions