In gypsy jazz octaves are used to establish a theme and create an effect. They are struck like a chord and you must make sure to dampen the other strings.
Attacking octaves with the plectrum recalls of course of Django Reinhardt, who used them to increase the expressive power of a phrase and to give character to his playing.
You can also strike them with the thumb. In this way you will obtain a more gentle sound.