Bactrocera bryoniae is a polyphagous and economically significant fruit fly found in Indonesia, Papua New Guinea and Australia. To understand chemical-mediated sexual communication, and the potential for novel pheromone-based attractants for monitoring and mass-trapping of B. bryoniae, rectal gland exudates and emissions from sexually mature males and females were investigated. Gas chromatography-mass spectrometry showed that male rectal glands contained six compounds, of which 1,7-dioxaspiro [5,5]undecane elicited electroantennographic (EAD) and electropalpographic (EPD) responses in both sexes, ethyl 3-acetoxybutanoate elicited EPD responses in both sexes, N-(3-methylbutyl)acetamide elicited EAD response from males and 4-hydroxy-1,7-dioxaspiro[5.5]undecane elicited EAD responses in males and females and EPD responses in females. Female rectal glands contained 23 compounds with the esters ethyl laurate and ethyl myristate as major components. Amongst the female rectal gland constituents, ethyl laurate, ethyl myristate and ethyl palmitate elicited EAD responses in males and females, N-(3-methylbutyl)acetamide elicited EAD responses in males only, (E,E)-2,8-dimethyl-1,7-dioxaspiro[5.5]undecane elicited EAD responses in males and EPD responses in females, and 2,7-dimethyl-1,6-dioxaspiro[4.5] decane, (E,E)-2-ethyl-7-methyl-1,6-dioxaspiro[4.5]decane, (E,E)-2-ethyl-8-methyl-1,7-dioxaspiro[5.5]undecane, (Z,Z)-2,8-dimethyl-1,7-dioxaspiro[5.5]undecane, (E,E)-2-propyl-8-methyl-1,7-dioxaspiro[5.5]undecane and ethyl caprate elicited EPD responses in females only. Y-tube bioassays indicated that male rectal gland extracts and headspace volatiles attracted females and males, while female rectal gland extracts and headspace volatiles only attracted males. The results suggest that ethyl 3-acetoxybutanoate, 1,7-dioxaspiro [5,5]undecane and 4-hydroxy-1,7-dioxaspiro[5.5]undecane may be components of male-produced sex pheromone in B. bryoniae while (E,E)-2,8-dimethyl-1,7-dioxaspiro [5.5]undecane, N-(3-methylbutyl) acetamide, ethyl laurate, ethyl myristate and ethyl palmitate may be components of female-produced sex pheromone. Ethyl 3-acetoxybutanoate, N-(3-methylbutyl) acetamide, 1,7-dioxaspiro [5,5]undecane and 4-hydroxy-1,7-dioxaspiro[5.5]undecane may be components of male aggregation pheromone. These findings contribute to the understanding of pheromone communication in B. bryoniae and provide a foundation for developing pheromone-based monitoring and control methods.