# Enabling different discovery plugin

**URL:** <https://discuss.elastic.co/t/enabling-different-discovery-plugin/23193>\
**Category:** Elasticsearch\
**Created:** [April 10, 2015, 7:51pm UTC](https://discuss.elastic.co/t/enabling-different-discovery-plugin/23193 "2015-04-10T19:51:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinicius\_Carvalho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_carvalho/32/770_2.png) [@Vinicius\_Carvalho](https://discuss.elastic.co/u/Vinicius_Carvalho)\
**Post date:** [April 10, 2015, 7:51pm UTC](https://discuss.elastic.co/t/enabling-different-discovery-plugin/23193/1 "2015-04-10T19:51:11Z")

</div>

Hi there, I wrote plugins before, but I'm not getting how to extend the  
discovery plugin. From the examples, it seems that once one extend  
ZenDiscoveryModule bind the proper discovery to its own discovery, add the  
proper UnicastHostProvider things should work. But I can't get my  
discoverymodule to load:

in the config I have:

discovery:  
type: custom

And:

CustomDiscoveryModule extends ZenDiscoveryModule  
CustomDiscover extends ZenDiscover  
CustomUnicastHostProvider implements UnicastHostsProvider

I have one plugin just to load the plugin, I tried to add the  
CustomDiscoveryModule on the modules list but I got an error saying binding  
for that interface had already happened.

My best guess is that when set the type of discovery, ES uses some form of  
naming convention to load the class, but this does not seems to be  
happening.

Any suggestions on where to look next?

Regards

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/18785746-17c7-4467-a904-753bb938fd77%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/18785746-17c7-4467-a904-753bb938fd77%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Vinicius\_Carvalho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_carvalho/32/770_2.png) [@Vinicius\_Carvalho](https://discuss.elastic.co/u/Vinicius_Carvalho)\
**Post date:** [April 10, 2015, 8:10pm UTC](https://discuss.elastic.co/t/enabling-different-discovery-plugin/23193/2 "2015-04-10T20:10:04Z")

</div>

Extra space on my yml ☹

Thanks

On Friday, April 10, 2015 at 3:51:11 PM UTC-4, Vinicius Carvalho wrote:

> Hi there, I wrote plugins before, but I'm not getting how to extend the  
> discovery plugin. From the examples, it seems that once one extend  
> ZenDiscoveryModule bind the proper discovery to its own discovery, add the  
> proper UnicastHostProvider things should work. But I can't get my  
> discoverymodule to load:
> 
> in the config I have:
> 
> discovery:  
> type: custom
> 
> And:
> 
> CustomDiscoveryModule extends ZenDiscoveryModule  
> CustomDiscover extends ZenDiscover  
> CustomUnicastHostProvider implements UnicastHostsProvider
> 
> I have one plugin just to load the plugin, I tried to add the  
> CustomDiscoveryModule on the modules list but I got an error saying binding  
> for that interface had already happened.
> 
> My best guess is that when set the type of discovery, ES uses some form of  
> naming convention to load the class, but this does not seems to be  
> happening.
> 
> Any suggestions on where to look next?
> 
> Regards

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b7e2f257-d6b3-4b42-93e4-b8dad48b2a32%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b7e2f257-d6b3-4b42-93e4-b8dad48b2a32%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 10, 2015, 9:14pm UTC](https://discuss.elastic.co/t/enabling-different-discovery-plugin/23193/3 "2015-04-10T21:14:43Z")

</div>

Package name is important here.  
Have a look at aws cloud plugin If you need code example BTW.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 10 avr. 2015 à 21:51, Vinicius Carvalho [viniciusccarvalho@gmail.com](mailto:viniciusccarvalho@gmail.com) a écrit :
> 
> Hi there, I wrote plugins before, but I'm not getting how to extend the discovery plugin. From the examples, it seems that once one extend ZenDiscoveryModule bind the proper discovery to its own discovery, add the proper UnicastHostProvider things should work. But I can't get my discoverymodule to load:
> 
> in the config I have:
> 
> discovery:  
> type: custom
> 
> And:
> 
> CustomDiscoveryModule extends ZenDiscoveryModule  
> CustomDiscover extends ZenDiscover  
> CustomUnicastHostProvider implements UnicastHostsProvider
> 
> I have one plugin just to load the plugin, I tried to add the CustomDiscoveryModule on the modules list but I got an error saying binding for that interface had already happened.
> 
> My best guess is that when set the type of discovery, ES uses some form of naming convention to load the class, but this does not seems to be happening.
> 
> Any suggestions on where to look next?
> 
> ## Regards
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/18785746-17c7-4467-a904-753bb938fd77%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/18785746-17c7-4467-a904-753bb938fd77%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/31812B1A-DD11-4354-949F-BB7708F89571%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/31812B1A-DD11-4354-949F-BB7708F89571%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:20am UTC](https://discuss.elastic.co/t/enabling-different-discovery-plugin/23193/4 "2017-07-06T00:20:16Z")

</div>

Closed on July 6, 2017, 12:20am UTC


