anchor.diff:  |SUBSCRIPTION_CANCEL
   |Occurs when a subscription is cancelled
   |SUBSCRIPTION_UNCANCEL
  -|Occurs when a subscription cancellation is undone (Note that subscription cancellation  cannot be undone once the cancellation becomes effective )
  +|Occurs when a subscription cancellation is undone (Note that subscription cancellation  cannot be undone once the cancellation becomes effective)
   |SUBSCRIPTION_BCD_CHANGE
   |Occurs when the subscription billing date is changed
   |ENTITLEMENT_CREATION
  
positive.code: 
  == How to develop your custom notification plugin
  
  We provide an interface called https://github.com/killbill/killbill-platform/blob/master/osgi-bundles/libs/killbill/src/main/java/org/killbill/billing/osgi/libs/killbill/OSGIKillbillEventDispatcher.java[OSGIKillbillEventDispatcher.OSGIKillbillEventHandler]. In order to create your own notification plugin, you need to write code that implements this interface and implement the `public void handleKillbillEvent(final ExtBusEvent killbillEvent)` method. 
  
  We also provide a simple https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] that can be used as the starting point to develop your custom notification plugin. 
  You can refer to our https://docs.killbill.io/latest/plugin_development.html#_java_plugins[plugin development] document in order to understand how to set up the https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] plugin code.
  
  The https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] has a class called https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldListener.java[HelloWorldListener.java]. This implements the `OSGIKillbillEventDispatcher.OSGIKillbillEventHandler` interface . You can create a class similar to this and write your plugin code within the `handleKillbillEvent` method.
  
  Kill Bill provides a class called https://github.com/killbill/killbill-platform/blob/master/osgi-bundles/libs/killbill/src/main/java/org/killbill/billing/osgi/libs/killbill/OSGIKillbillAPI.java[OSGIKillBillAPI.java]. This class exposes all of Kill Bill's internal APIs. An object of this class will automatically be available in your plugin. For example, the `HelloWorldListener` declares a field corresponding to `osgiKillbillAPI` at Line 36 which is intialized via the constructor.
  
  The `osgiKillbillAPI` object can then be used to fetch the appropriate api object which can in turn be used to fetch additional information. For example, Line 57 in `HelloWorldListener` invokes `osgiKillbillAPI.getAccountUserApi`  using which it obtains Account information about the changed account. You can similarly use the `osgiKillbillAPI` to fetch necessary information.
  
  
  
  == Kill Bill Events Handled by Notification Plugin
  
  The following table lists all the events that the notification plugin is capabile of handling. These are actually just enum constants defined in https://github.com/killbill/killbill-plugin-api/blob/master/notification/src/main/java/org/killbill/billing/notification/plugin/api/ExtBusEventType.java[ExtBusEventType]
  
  |===
  |Event Name | Event Description
  
negative.code: 
  When the `NotificationPluginApiRetryException` is caught by Kill Bill, the system computes the next retry date based on the schedule specified in the exception and the number of times that specific event has been retried. 
  
  So, in terms of responsabilities:
  
  * Plugin is in charge of deciding whether a `NotificationPluginApiRetryException` should be thrown and attach the associated retry schedule to it.
  * Kill Bill manages the retry logic and also keeps count of # existing retries versus retry schedule.
  
  It is expected that the plugin will simply pass the same retry schedule for each retry iteration, but this is not enforced and left for the plugin to decide. Kill Bill will look at the most recent retry schedule attached to the exception currently being handled and determine what to do based on that. If for instance a first schedule included 2 retries 10 days apart, and then upon retrying one time, the new schedule now includes only 1 retry, the cycle of retries would end there (as the latest schedule contains only one retry and Kill Bill already retried one time).
  Because of such behavior, any plugin can trigger retries at any time: it is hence important that your listener is idempotent.
  
  
  
  