Question about killbill events

42 views
Skip to first unread message

daniel.n...@gmail.com

unread,
Dec 4, 2020, 10:06:15 AM12/4/20
to Kill Bill users mailing-list
I am i bit confused about the how often the events are handled when changing plans.

If i change the subscription of a plan and specify todays date It still has the old plan.
I can see event in the TIMELINE as a CHANGE.

When can i expect the change to go though?
Is there some kind of event handler running?
Is there somewhere i can read more about the events are supposed to work somewhere?

Thanks
/Daniel

daniel.n...@gmail.com

unread,
Dec 5, 2020, 8:20:51 AM12/5/20
to Kill Bill users mailing-list
I found your blogpost about the event system https://killbill.io/blog/persistent-bus-in-kill-bill/
In case someone is curious and finds this post i will try and explain what i have found. In case my asumptions are wrong please let me know.

There are 4 tables for the bus events described in the blogpost

The internal ones
bus_events      
bus_events_history

The mirrored external ones.
bus_ext_events
bus_ext_events_history

Im guessing the ext ones are used for push notifications

I havent notifced any differences in what gets inserted so it seems like

When events are made they are inserted into bus_events. When they are handled they are deleted bus_events and inserted into bus_events_history.
The different killbill subsystems can subscribe to these events.

There is also invoice_billing_events which i didnt look into

Then there are the two tables related to the subscription events

subscription_event_history
subscription_events       

This works in a differnet way. Events are writen to both tables

subscription_event_history keeps all events

If you for example undo a future change the event will be deleted from subscription_events but it will still be in subscription_event_history

--------

I do still have a question

I am seeing some different kind of errors when i try to change a subscription and specify the current date.
It seems to work sometimes. Other times the change does not go through or i get an error.

Are you supposed to be able to specify todays date or should you just not give the date and specify a a billingPolicy of IMMEDIATE or something like that?

stephane brossier

unread,
Dec 7, 2020, 8:58:54 PM12/7/20
to daniel.n...@gmail.com, Kill Bill users mailing-list
I found your blogpost about the event system https://killbill.io/blog/persistent-bus-in-kill-bill/
In case someone is curious and finds this post i will try and explain what i have found. In case my asumptions are wrong please let me know.

[...]

Your description is about right, but keep in mind that the only tables related to 'bus events' are bus_events , bus_events_history, bus_ext_events, bus_ext_events_history. Other tables such as invoice_billing_events or subscription_events have nothing to do with internal bus event logic.


--------

I do still have a question

I am seeing some different kind of errors when i try to change a subscription and specify the current date.
It seems to work sometimes. Other times the change does not go through or i get an error.

Are you supposed to be able to specify todays date or should you just not give the date and specify a a billingPolicy of IMMEDIATE or something like that?


Regarding the error, I am not sure what you are referring to (which call, which params, which error).

In terms of date/policy, passing a null effective date will make the action immediate (on purpose). Otherwise, date or policy should work as designated. Have you looked at our api doc e.g https://killbill.github.io/slate/#subscription-cancel-a-subscription ?





On Friday, December 4, 2020 at 4:06:15 PM UTC+1 daniel.n...@gmail.com wrote:
I am i bit confused about the how often the events are handled when changing plans.

If i change the subscription of a plan and specify todays date It still has the old plan.
I can see event in the TIMELINE as a CHANGE.

When can i expect the change to go though?
Is there some kind of event handler running?
Is there somewhere i can read more about the events are supposed to work somewhere?

Thanks
/Daniel

--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/5784e024-9f95-4cd5-9bce-cabedf9c2000n%40googlegroups.com.

daniel.n...@gmail.com

unread,
Dec 12, 2020, 7:18:28 AM12/12/20
to Kill Bill users mailing-list
Thanks for the information

Im going to use null as "todays" date and see if that solves my problem
Reply all
Reply to author
Forward
0 new messages