In a heavy-based saucepan cook the bacon in some oil until just starting to brown and crisp, remove from the pan and reserve.
Add the onion and sweat off for 5 minutes without colour. Add the rest of the ingredients and cook on a medium heat for an hour stirring regularly.
Add a touch of water if becoming too sticky. Allow to cool for 30 minutes then pulse in a food processor to a jam like texture.
Pour into a sterilised jar and refrigerate for up to 2 weeks. For the toastie, grill the bacon to your liking, butter the bread on both sides of each slices.
Slice the avocado, layer one side of bread with the bacon then avocado, spread the jam on the remaining slice and bring together. In a frying pan on a medium heat, cook the sandwich on each side till golden brown.